Class Bucket.Lifecycle.Rule.Condition (2.43.1)

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
Type Description
int

CREATED_BEFORE_FIELD_NUMBER

public static final int CREATED_BEFORE_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_TIME_BEFORE_FIELD_NUMBER

public static final int CUSTOM_TIME_BEFORE_FIELD_NUMBER
Field Value
Type Description
int

DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER

public static final int DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER
Field Value
Type Description
int

DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER

public static final int DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER
Field Value
Type Description
int

IS_LIVE_FIELD_NUMBER

public static final int IS_LIVE_FIELD_NUMBER
Field Value
Type Description
int

MATCHES_PREFIX_FIELD_NUMBER

public static final int MATCHES_PREFIX_FIELD_NUMBER
Field Value
Type Description
int

MATCHES_STORAGE_CLASS_FIELD_NUMBER

public static final int MATCHES_STORAGE_CLASS_FIELD_NUMBER
Field Value
Type Description
int

MATCHES_SUFFIX_FIELD_NUMBER

public static final int MATCHES_SUFFIX_FIELD_NUMBER
Field Value
Type Description
int

NONCURRENT_TIME_BEFORE_FIELD_NUMBER

public static final int NONCURRENT_TIME_BEFORE_FIELD_NUMBER
Field Value
Type Description
int

NUM_NEWER_VERSIONS_FIELD_NUMBER

public static final int NUM_NEWER_VERSIONS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Bucket.Lifecycle.Rule.Condition getDefaultInstance()
Returns
Type Description
Bucket.Lifecycle.Rule.Condition

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Bucket.Lifecycle.Rule.Condition.Builder newBuilder()
Returns
Type Description
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
Name Description
prototype Bucket.Lifecycle.Rule.Condition
Returns
Type Description
Bucket.Lifecycle.Rule.Condition.Builder

parseDelimitedFrom(InputStream input)

public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Bucket.Lifecycle.Rule.Condition parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Bucket.Lifecycle.Rule.Condition
Exceptions
Type Description
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
int

The daysSinceNoncurrentTime.

getDefaultInstanceForType()

public Bucket.Lifecycle.Rule.Condition getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
int

The numNewerVersions.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the numNewerVersions field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType()
Returns
Type Description
Bucket.Lifecycle.Rule.Condition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Bucket.Lifecycle.Rule.Condition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Bucket.Lifecycle.Rule.Condition.Builder toBuilder()
Returns
Type Description
Bucket.Lifecycle.Rule.Condition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException