Class BucketInfo.LifecycleRule.LifecycleCondition.Builder (2.5.1)

public static class BucketInfo.LifecycleRule.LifecycleCondition.Builder

Builder for LifecycleCondition.

Inheritance

java.lang.Object > BucketInfo.LifecycleRule.LifecycleCondition.Builder

Methods

build()

public BucketInfo.LifecycleRule.LifecycleCondition build()

Builds a LifecycleCondition object. *

Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition

setAge(Integer age)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setAge(Integer age)

Sets the age in days. This condition is satisfied when a Blob reaches the specified age (in days). When you specify the Age condition, you are specifying a Time to Live (TTL) for objects in a bucket with lifecycle management configured. The time when the Age condition is considered to be satisfied is calculated by adding the specified value to the object creation time.

Parameter
NameDescription
ageInteger
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setCreatedBefore(DateTime createdBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setCreatedBefore(DateTime createdBefore)

Sets the date a Blob should be created before for an Action to be executed. Note that only the date will be considered, if the time is specified it will be truncated. This condition is satisfied when an object is created before midnight of the specified date in UTC. *

Parameter
NameDescription
createdBeforecom.google.api.client.util.DateTime
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setCustomTimeBefore(DateTime customTimeBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setCustomTimeBefore(DateTime customTimeBefore)

Sets the date in RFC 3339 format with only the date part (for instance, "2013-01-15"). Note that only date part will be considered, if the time is specified it will be truncated. This condition is satisfied when the custom time on an object is before this date in UTC.

Parameter
NameDescription
customTimeBeforecom.google.api.client.util.DateTime
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setDaysSinceCustomTime(Integer daysSinceCustomTime)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setDaysSinceCustomTime(Integer daysSinceCustomTime)

Sets the number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.

Parameter
NameDescription
daysSinceCustomTimeInteger
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setDaysSinceNoncurrentTime(Integer daysSinceNoncurrentTime)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setDaysSinceNoncurrentTime(Integer daysSinceNoncurrentTime)

Sets the number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.

Parameter
NameDescription
daysSinceNoncurrentTimeInteger
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setIsLive(Boolean live)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setIsLive(Boolean live)

Sets an isLive Boolean condition. If the value is true, this lifecycle condition matches only live Blobs; if the value is false, it matches only archived objects. For the purposes of this condition, Blobs in non-versioned buckets are considered live.

Parameter
NameDescription
liveBoolean
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setMatchesStorageClass(List<StorageClass> matchesStorageClass)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setMatchesStorageClass(List<StorageClass> matchesStorageClass)

Sets a list of Storage Classes for a objects that satisfy the condition to execute the Action. *

Parameter
NameDescription
matchesStorageClassList<StorageClass>
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setNoncurrentTimeBefore(DateTime noncurrentTimeBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setNoncurrentTimeBefore(DateTime noncurrentTimeBefore)

Sets the date in RFC 3339 format with only the date part (for instance, "2013-01-15"). Note that only date part will be considered, if the time is specified it will be truncated. This condition is satisfied when the noncurrent time on an object is before this date. This condition is relevant only for versioned objects.

Parameter
NameDescription
noncurrentTimeBeforecom.google.api.client.util.DateTime
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setNumberOfNewerVersions(Integer numberOfNewerVersions)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setNumberOfNewerVersions(Integer numberOfNewerVersions)

Sets the number of newer versions a Blob should have for an Action to be executed. Relevant only when versioning is enabled on a bucket. *

Parameter
NameDescription
numberOfNewerVersionsInteger
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder