Class Bucket.Lifecycle.Rule.Condition (2.9.0)

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

A condition of an object which triggers some action.

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > Bucket.Lifecycle.Rule.Condition

Static Fields

AGE_DAYS_FIELD_NUMBER

public static final int AGE_DAYS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATED_BEFORE_FIELD_NUMBER

public static final int CREATED_BEFORE_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_TIME_BEFORE_FIELD_NUMBER

public static final int CUSTOM_TIME_BEFORE_FIELD_NUMBER
Field Value
TypeDescription
int

DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER

public static final int DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER

public static final int DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

IS_LIVE_FIELD_NUMBER

public static final int IS_LIVE_FIELD_NUMBER
Field Value
TypeDescription
int

MATCHES_PREFIX_FIELD_NUMBER

public static final int MATCHES_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

MATCHES_STORAGE_CLASS_FIELD_NUMBER

public static final int MATCHES_STORAGE_CLASS_FIELD_NUMBER
Field Value
TypeDescription
int

MATCHES_SUFFIX_FIELD_NUMBER

public static final int MATCHES_SUFFIX_FIELD_NUMBER
Field Value
TypeDescription
int

NONCURRENT_TIME_BEFORE_FIELD_NUMBER

public static final int NONCURRENT_TIME_BEFORE_FIELD_NUMBER
Field Value
TypeDescription
int

NUM_NEWER_VERSIONS_FIELD_NUMBER

public static final int NUM_NEWER_VERSIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Bucket.Lifecycle.Rule.Condition getDefaultInstance()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition

getDescriptor()

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

newBuilder()

public static Bucket.Lifecycle.Rule.Condition.Builder newBuilder()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

newBuilder(Bucket.Lifecycle.Rule.Condition prototype)

public static Bucket.Lifecycle.Rule.Condition.Builder newBuilder(Bucket.Lifecycle.Rule.Condition prototype)
Parameter
NameDescription
prototypeBucket.Lifecycle.Rule.Condition
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

parseDelimitedFrom(InputStream input)

public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Bucket.Lifecycle.Rule.Condition parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Bucket.Lifecycle.Rule.Condition> parser()
Returns
TypeDescription
Parser<Condition>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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.

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

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.

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.

getParserForType()

public Parser<Bucket.Lifecycle.Rule.Condition> getParserForType()
Returns
TypeDescription
Parser<Condition>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Bucket.Lifecycle.Rule.Condition.Builder toBuilder()
Returns
TypeDescription
Bucket.Lifecycle.Rule.Condition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException