Class BucketInfo.LifecycleRule.LifecycleCondition.Builder (2.30.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
Type Description
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
Name Description
age Integer
Returns
Type Description
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
Name Description
createdBefore com.google.api.client.util.DateTime
Returns
Type Description
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
Name Description
createdBefore OffsetDateTime
Returns
Type Description
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
Name Description
customTimeBefore com.google.api.client.util.DateTime
Returns
Type Description
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
Name Description
customTimeBefore OffsetDateTime
Returns
Type Description
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
Name Description
daysSinceCustomTime Integer
Returns
Type Description
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
Name Description
daysSinceNoncurrentTime Integer
Returns
Type Description
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
Name Description
live Boolean
Returns
Type Description
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
Name Description
matchesPrefix List<String>
Returns
Type Description
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
Name Description
matchesStorageClass List<StorageClass>
Returns
Type Description
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
Name Description
matchesSuffix List<String>
Returns
Type Description
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
Name Description
noncurrentTimeBefore com.google.api.client.util.DateTime
Returns
Type Description
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
Name Description
noncurrentTimeBefore OffsetDateTime
Returns
Type Description
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
Name Description
numberOfNewerVersions Integer
Returns
Type Description
BucketInfo.LifecycleRule.LifecycleCondition.Builder