Class Bucket.Lifecycle.Rule.Condition.Builder (2.20.1)

public static final class Bucket.Lifecycle.Rule.Condition.Builder extends GeneratedMessageV3.Builder<Bucket.Lifecycle.Rule.Condition.Builder> implements Bucket.Lifecycle.Rule.ConditionOrBuilder

A condition of an object which triggers some action.

Protobuf type google.storage.v2.Bucket.Lifecycle.Rule.Condition

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllMatchesPrefix(Iterable<String> values)

public Bucket.Lifecycle.Rule.Condition.Builder addAllMatchesPrefix(Iterable<String> values)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameter
NameDescription
valuesIterable<String>

The matchesPrefix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addAllMatchesStorageClass(Iterable<String> values)

public Bucket.Lifecycle.Rule.Condition.Builder addAllMatchesStorageClass(Iterable<String> values)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameter
NameDescription
valuesIterable<String>

The matchesStorageClass to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addAllMatchesSuffix(Iterable<String> values)

public Bucket.Lifecycle.Rule.Condition.Builder addAllMatchesSuffix(Iterable<String> values)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameter
NameDescription
valuesIterable<String>

The matchesSuffix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesPrefix(String value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesPrefix(String value)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameter
NameDescription
valueString

The matchesPrefix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesPrefixBytes(ByteString value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesPrefixBytes(ByteString value)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameter
NameDescription
valueByteString

The bytes of the matchesPrefix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesStorageClass(String value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesStorageClass(String value)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameter
NameDescription
valueString

The matchesStorageClass to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesStorageClassBytes(ByteString value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesStorageClassBytes(ByteString value)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameter
NameDescription
valueByteString

The bytes of the matchesStorageClass to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesSuffix(String value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesSuffix(String value)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameter
NameDescription
valueString

The matchesSuffix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addMatchesSuffixBytes(ByteString value)

public Bucket.Lifecycle.Rule.Condition.Builder addMatchesSuffixBytes(ByteString value)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameter
NameDescription
valueByteString

The bytes of the matchesSuffix to add.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Bucket.Lifecycle.Rule.Condition.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

build()

public Bucket.Lifecycle.Rule.Condition build()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition

buildPartial()

public Bucket.Lifecycle.Rule.Condition buildPartial()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition

clear()

public Bucket.Lifecycle.Rule.Condition.Builder clear()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

clearAgeDays()

public Bucket.Lifecycle.Rule.Condition.Builder clearAgeDays()

Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition.

optional int32 age_days = 1;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearCreatedBefore()

public Bucket.Lifecycle.Rule.Condition.Builder clearCreatedBefore()

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

clearCustomTimeBefore()

public Bucket.Lifecycle.Rule.Condition.Builder clearCustomTimeBefore()

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

clearDaysSinceCustomTime()

public Bucket.Lifecycle.Rule.Condition.Builder clearDaysSinceCustomTime()

Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer.

optional int32 days_since_custom_time = 7;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearDaysSinceNoncurrentTime()

public Bucket.Lifecycle.Rule.Condition.Builder clearDaysSinceNoncurrentTime()

This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. 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.

optional int32 days_since_noncurrent_time = 9;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Bucket.Lifecycle.Rule.Condition.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

clearIsLive()

public Bucket.Lifecycle.Rule.Condition.Builder clearIsLive()

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.

optional bool is_live = 3;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearMatchesPrefix()

public Bucket.Lifecycle.Rule.Condition.Builder clearMatchesPrefix()

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearMatchesStorageClass()

public Bucket.Lifecycle.Rule.Condition.Builder clearMatchesStorageClass()

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearMatchesSuffix()

public Bucket.Lifecycle.Rule.Condition.Builder clearMatchesSuffix()

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearNoncurrentTimeBefore()

public Bucket.Lifecycle.Rule.Condition.Builder clearNoncurrentTimeBefore()

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

clearNumNewerVersions()

public Bucket.Lifecycle.Rule.Condition.Builder clearNumNewerVersions()

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.

optional int32 num_newer_versions = 4;

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Bucket.Lifecycle.Rule.Condition.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

clone()

public Bucket.Lifecycle.Rule.Condition.Builder clone()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

getAgeDays()

public int getAgeDays()

Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition.

optional int32 age_days = 1;

Returns
TypeDescription
int

The ageDays.

getCreatedBefore()

public Date getCreatedBefore()

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Returns
TypeDescription
com.google.type.Date

The createdBefore.

getCreatedBeforeBuilder()

public Date.Builder getCreatedBeforeBuilder()

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Returns
TypeDescription
com.google.type.Date.Builder

getCreatedBeforeOrBuilder()

public DateOrBuilder getCreatedBeforeOrBuilder()

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Returns
TypeDescription
com.google.type.DateOrBuilder

getCustomTimeBefore()

public Date getCustomTimeBefore()

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Returns
TypeDescription
com.google.type.Date

The customTimeBefore.

getCustomTimeBeforeBuilder()

public Date.Builder getCustomTimeBeforeBuilder()

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Returns
TypeDescription
com.google.type.Date.Builder

getCustomTimeBeforeOrBuilder()

public DateOrBuilder getCustomTimeBeforeOrBuilder()

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Returns
TypeDescription
com.google.type.DateOrBuilder

getDaysSinceCustomTime()

public int getDaysSinceCustomTime()

Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer.

optional int32 days_since_custom_time = 7;

Returns
TypeDescription
int

The daysSinceCustomTime.

getDaysSinceNoncurrentTime()

public int getDaysSinceNoncurrentTime()

This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. 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.

optional int32 days_since_noncurrent_time = 9;

Returns
TypeDescription
int

The daysSinceNoncurrentTime.

getDefaultInstanceForType()

public Bucket.Lifecycle.Rule.Condition getDefaultInstanceForType()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIsLive()

public boolean getIsLive()

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.

optional bool is_live = 3;

Returns
TypeDescription
boolean

The isLive.

getMatchesPrefix(int index)

public String getMatchesPrefix(int index)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The matchesPrefix at the given index.

getMatchesPrefixBytes(int index)

public ByteString getMatchesPrefixBytes(int index)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the matchesPrefix at the given index.

getMatchesPrefixCount()

public int getMatchesPrefixCount()

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Returns
TypeDescription
int

The count of matchesPrefix.

getMatchesPrefixList()

public ProtocolStringList getMatchesPrefixList()

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Returns
TypeDescription
ProtocolStringList

A list containing the matchesPrefix.

getMatchesStorageClass(int index)

public String getMatchesStorageClass(int index)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The matchesStorageClass at the given index.

getMatchesStorageClassBytes(int index)

public ByteString getMatchesStorageClassBytes(int index)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the matchesStorageClass at the given index.

getMatchesStorageClassCount()

public int getMatchesStorageClassCount()

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Returns
TypeDescription
int

The count of matchesStorageClass.

getMatchesStorageClassList()

public ProtocolStringList getMatchesStorageClassList()

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the matchesStorageClass.

getMatchesSuffix(int index)

public String getMatchesSuffix(int index)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The matchesSuffix at the given index.

getMatchesSuffixBytes(int index)

public ByteString getMatchesSuffixBytes(int index)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the matchesSuffix at the given index.

getMatchesSuffixCount()

public int getMatchesSuffixCount()

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Returns
TypeDescription
int

The count of matchesSuffix.

getMatchesSuffixList()

public ProtocolStringList getMatchesSuffixList()

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Returns
TypeDescription
ProtocolStringList

A list containing the matchesSuffix.

getNoncurrentTimeBefore()

public Date getNoncurrentTimeBefore()

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Returns
TypeDescription
com.google.type.Date

The noncurrentTimeBefore.

getNoncurrentTimeBeforeBuilder()

public Date.Builder getNoncurrentTimeBeforeBuilder()

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Returns
TypeDescription
com.google.type.Date.Builder

getNoncurrentTimeBeforeOrBuilder()

public DateOrBuilder getNoncurrentTimeBeforeOrBuilder()

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Returns
TypeDescription
com.google.type.DateOrBuilder

getNumNewerVersions()

public int getNumNewerVersions()

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.

optional int32 num_newer_versions = 4;

Returns
TypeDescription
int

The numNewerVersions.

hasAgeDays()

public boolean hasAgeDays()

Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition.

optional int32 age_days = 1;

Returns
TypeDescription
boolean

Whether the ageDays field is set.

hasCreatedBefore()

public boolean hasCreatedBefore()

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Returns
TypeDescription
boolean

Whether the createdBefore field is set.

hasCustomTimeBefore()

public boolean hasCustomTimeBefore()

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Returns
TypeDescription
boolean

Whether the customTimeBefore field is set.

hasDaysSinceCustomTime()

public boolean hasDaysSinceCustomTime()

Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer.

optional int32 days_since_custom_time = 7;

Returns
TypeDescription
boolean

Whether the daysSinceCustomTime field is set.

hasDaysSinceNoncurrentTime()

public boolean hasDaysSinceNoncurrentTime()

This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. 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.

optional int32 days_since_noncurrent_time = 9;

Returns
TypeDescription
boolean

Whether the daysSinceNoncurrentTime field is set.

hasIsLive()

public boolean hasIsLive()

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.

optional bool is_live = 3;

Returns
TypeDescription
boolean

Whether the isLive field is set.

hasNoncurrentTimeBefore()

public boolean hasNoncurrentTimeBefore()

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Returns
TypeDescription
boolean

Whether the noncurrentTimeBefore field is set.

hasNumNewerVersions()

public boolean hasNumNewerVersions()

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.

optional int32 num_newer_versions = 4;

Returns
TypeDescription
boolean

Whether the numNewerVersions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreatedBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder mergeCreatedBefore(Date value)

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

mergeCustomTimeBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder mergeCustomTimeBefore(Date value)

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Bucket.Lifecycle.Rule.Condition.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Bucket.Lifecycle.Rule.Condition.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

mergeFrom(Bucket.Lifecycle.Rule.Condition other)

public Bucket.Lifecycle.Rule.Condition.Builder mergeFrom(Bucket.Lifecycle.Rule.Condition other)
Parameter
NameDescription
otherBucket.Lifecycle.Rule.Condition
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

mergeNoncurrentTimeBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder mergeNoncurrentTimeBefore(Date value)

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Bucket.Lifecycle.Rule.Condition.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

setAgeDays(int value)

public Bucket.Lifecycle.Rule.Condition.Builder setAgeDays(int value)

Age of an object (in days). This condition is satisfied when an object reaches the specified age. A value of 0 indicates that all objects immediately match this condition.

optional int32 age_days = 1;

Parameter
NameDescription
valueint

The ageDays to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setCreatedBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder setCreatedBefore(Date value)

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setCreatedBefore(Date.Builder builderForValue)

public Bucket.Lifecycle.Rule.Condition.Builder setCreatedBefore(Date.Builder builderForValue)

This condition is satisfied when an object is created before midnight of the specified date in UTC.

.google.type.Date created_before = 2;

Parameter
NameDescription
builderForValuecom.google.type.Date.Builder
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setCustomTimeBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder setCustomTimeBefore(Date value)

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setCustomTimeBefore(Date.Builder builderForValue)

public Bucket.Lifecycle.Rule.Condition.Builder setCustomTimeBefore(Date.Builder builderForValue)

An object matches this condition if the custom timestamp set on the object is before the specified date in UTC.

.google.type.Date custom_time_before = 8;

Parameter
NameDescription
builderForValuecom.google.type.Date.Builder
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setDaysSinceCustomTime(int value)

public Bucket.Lifecycle.Rule.Condition.Builder setDaysSinceCustomTime(int value)

Number of days that have elapsed since the custom timestamp set on an object. The value of the field must be a nonnegative integer.

optional int32 days_since_custom_time = 7;

Parameter
NameDescription
valueint

The daysSinceCustomTime to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setDaysSinceNoncurrentTime(int value)

public Bucket.Lifecycle.Rule.Condition.Builder setDaysSinceNoncurrentTime(int value)

This condition is relevant only for versioned objects. An object version satisfies this condition only if these many days have been passed since it became noncurrent. 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.

optional int32 days_since_noncurrent_time = 9;

Parameter
NameDescription
valueint

The daysSinceNoncurrentTime to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Bucket.Lifecycle.Rule.Condition.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

setIsLive(boolean value)

public Bucket.Lifecycle.Rule.Condition.Builder setIsLive(boolean value)

Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.

optional bool is_live = 3;

Parameter
NameDescription
valueboolean

The isLive to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setMatchesPrefix(int index, String value)

public Bucket.Lifecycle.Rule.Condition.Builder setMatchesPrefix(int index, String value)

List of object name prefixes. If any prefix exactly matches the beginning of the object name, the condition evaluates to true.

repeated string matches_prefix = 11;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The matchesPrefix to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setMatchesStorageClass(int index, String value)

public Bucket.Lifecycle.Rule.Condition.Builder setMatchesStorageClass(int index, String value)

Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.

repeated string matches_storage_class = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The matchesStorageClass to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setMatchesSuffix(int index, String value)

public Bucket.Lifecycle.Rule.Condition.Builder setMatchesSuffix(int index, String value)

List of object name suffixes. If any suffix exactly matches the end of the object name, the condition evaluates to true.

repeated string matches_suffix = 12;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The matchesSuffix to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setNoncurrentTimeBefore(Date value)

public Bucket.Lifecycle.Rule.Condition.Builder setNoncurrentTimeBefore(Date value)

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Parameter
NameDescription
valuecom.google.type.Date
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setNoncurrentTimeBefore(Date.Builder builderForValue)

public Bucket.Lifecycle.Rule.Condition.Builder setNoncurrentTimeBefore(Date.Builder builderForValue)

This condition is relevant only for versioned objects. An object version satisfies this condition only if it became noncurrent before the specified date in UTC.

.google.type.Date noncurrent_time_before = 10;

Parameter
NameDescription
builderForValuecom.google.type.Date.Builder
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

setNumNewerVersions(int value)

public Bucket.Lifecycle.Rule.Condition.Builder setNumNewerVersions(int value)

Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.

optional int32 num_newer_versions = 4;

Parameter
NameDescription
valueint

The numNewerVersions to set.

Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Bucket.Lifecycle.Rule.Condition.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Bucket.Lifecycle.Rule.Condition.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides