Class BucketInfo.LifecycleRule.LifecycleCondition.Builder (2.20.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) (deprecated)

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

Deprecated. Use #setCreatedBeforeOffsetDateTime(OffsetDateTime)

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

setCreatedBeforeOffsetDateTime(OffsetDateTime createdBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setCreatedBeforeOffsetDateTime(OffsetDateTime 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
createdBeforeOffsetDateTime
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setCustomTimeBefore(DateTime customTimeBefore) (deprecated)

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

Deprecated. Use #setCustomTimeBeforeOffsetDateTime(OffsetDateTime)

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

setCustomTimeBeforeOffsetDateTime(OffsetDateTime customTimeBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setCustomTimeBeforeOffsetDateTime(OffsetDateTime customTimeBefore)

Sets the date 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
customTimeBeforeOffsetDateTime
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

setMatchesPrefix(List<String> matchesPrefix)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setMatchesPrefix(List<String> matchesPrefix)

Sets the list of prefixes. If any prefix matches the beginning of the object’s name, this portion of the condition is satisfied for that object.

Parameter
NameDescription
matchesPrefixList<String>
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

setMatchesSuffix(List<String> matchesSuffix)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setMatchesSuffix(List<String> matchesSuffix)

Sets the list of suffixes. If any suffix matches the end of the object’s name, this portion of the condition is satisfied for that object.

Parameter
NameDescription
matchesSuffixList<String>
Returns
TypeDescription
BucketInfo.LifecycleRule.LifecycleCondition.Builder

setNoncurrentTimeBefore(DateTime noncurrentTimeBefore) (deprecated)

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

Deprecated. Use #setNoncurrentTimeBeforeOffsetDateTime(OffsetDateTime)

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

setNoncurrentTimeBeforeOffsetDateTime(OffsetDateTime noncurrentTimeBefore)

public BucketInfo.LifecycleRule.LifecycleCondition.Builder setNoncurrentTimeBeforeOffsetDateTime(OffsetDateTime noncurrentTimeBefore)

Sets the date 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
noncurrentTimeBeforeOffsetDateTime
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