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
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
Returns
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
Name |
Description |
createdBefore |
com.google.api.client.util.DateTime
|
Returns
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
Name |
Description |
customTimeBefore |
com.google.api.client.util.DateTime
|
Returns
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
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
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
Returns
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\u2019s name, this
portion of the condition is satisfied for that object.
Parameter
Returns
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
Returns
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\u2019s name, this
portion of the condition is satisfied for that object.
Parameter
Returns
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
Name |
Description |
noncurrentTimeBefore |
com.google.api.client.util.DateTime
|
Returns
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