Class Bucket.Lifecycle.Rule.Condition

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.storage.v2.Bucket.Lifecycle.Rule.Condition
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Bucket.Lifecycle.Rule.ConditionOrBuilder, Serializable
Enclosing class:
Bucket.Lifecycle.Rule

public static final class Bucket.Lifecycle.Rule.Condition extends com.google.protobuf.GeneratedMessageV3 implements Bucket.Lifecycle.Rule.ConditionOrBuilder
 A condition of an object which triggers some action.
 
Protobuf type google.storage.v2.Bucket.Lifecycle.Rule.Condition
See Also:
  • Field Details

    • AGE_DAYS_FIELD_NUMBER

      public static final int AGE_DAYS_FIELD_NUMBER
      See Also:
    • CREATED_BEFORE_FIELD_NUMBER

      public static final int CREATED_BEFORE_FIELD_NUMBER
      See Also:
    • IS_LIVE_FIELD_NUMBER

      public static final int IS_LIVE_FIELD_NUMBER
      See Also:
    • NUM_NEWER_VERSIONS_FIELD_NUMBER

      public static final int NUM_NEWER_VERSIONS_FIELD_NUMBER
      See Also:
    • MATCHES_STORAGE_CLASS_FIELD_NUMBER

      public static final int MATCHES_STORAGE_CLASS_FIELD_NUMBER
      See Also:
    • DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER

      public static final int DAYS_SINCE_CUSTOM_TIME_FIELD_NUMBER
      See Also:
    • CUSTOM_TIME_BEFORE_FIELD_NUMBER

      public static final int CUSTOM_TIME_BEFORE_FIELD_NUMBER
      See Also:
    • DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER

      public static final int DAYS_SINCE_NONCURRENT_TIME_FIELD_NUMBER
      See Also:
    • NONCURRENT_TIME_BEFORE_FIELD_NUMBER

      public static final int NONCURRENT_TIME_BEFORE_FIELD_NUMBER
      See Also:
    • MATCHES_PREFIX_FIELD_NUMBER

      public static final int MATCHES_PREFIX_FIELD_NUMBER
      See Also:
    • MATCHES_SUFFIX_FIELD_NUMBER

      public static final int MATCHES_SUFFIX_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • 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;
      Specified by:
      hasAgeDays in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the ageDays field is set.
    • 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;
      Specified by:
      getAgeDays in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The ageDays.
    • hasCreatedBefore

      public boolean hasCreatedBefore()
       Optional. This condition is satisfied when an object is created
       before midnight of the specified date in UTC.
       
      .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCreatedBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the createdBefore field is set.
    • getCreatedBefore

      public com.google.type.Date getCreatedBefore()
       Optional. This condition is satisfied when an object is created
       before midnight of the specified date in UTC.
       
      .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCreatedBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The createdBefore.
    • getCreatedBeforeOrBuilder

      public com.google.type.DateOrBuilder getCreatedBeforeOrBuilder()
       Optional. This condition is satisfied when an object is created
       before midnight of the specified date in UTC.
       
      .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCreatedBeforeOrBuilder in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
    • 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;
      Specified by:
      hasIsLive in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the isLive field is set.
    • 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;
      Specified by:
      getIsLive in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The isLive.
    • 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;
      Specified by:
      hasNumNewerVersions in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the numNewerVersions field is set.
    • 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;
      Specified by:
      getNumNewerVersions in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The numNewerVersions.
    • getMatchesStorageClassList

      public com.google.protobuf.ProtocolStringList getMatchesStorageClassList()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesStorageClassList in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      A list containing the matchesStorageClass.
    • getMatchesStorageClassCount

      public int getMatchesStorageClassCount()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesStorageClassCount in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The count of matchesStorageClass.
    • getMatchesStorageClass

      public String getMatchesStorageClass(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesStorageClass in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The matchesStorageClass at the given index.
    • getMatchesStorageClassBytes

      public com.google.protobuf.ByteString getMatchesStorageClassBytes(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesStorageClassBytes in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the matchesStorageClass at the given index.
    • 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;
      Specified by:
      hasDaysSinceCustomTime in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the daysSinceCustomTime field is set.
    • 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;
      Specified by:
      getDaysSinceCustomTime in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The daysSinceCustomTime.
    • hasCustomTimeBefore

      public boolean hasCustomTimeBefore()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCustomTimeBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the customTimeBefore field is set.
    • getCustomTimeBefore

      public com.google.type.Date getCustomTimeBefore()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCustomTimeBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The customTimeBefore.
    • getCustomTimeBeforeOrBuilder

      public com.google.type.DateOrBuilder getCustomTimeBeforeOrBuilder()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCustomTimeBeforeOrBuilder in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
    • 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;
      Specified by:
      hasDaysSinceNoncurrentTime in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the daysSinceNoncurrentTime field is set.
    • 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;
      Specified by:
      getDaysSinceNoncurrentTime in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The daysSinceNoncurrentTime.
    • hasNoncurrentTimeBefore

      public boolean hasNoncurrentTimeBefore()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasNoncurrentTimeBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      Whether the noncurrentTimeBefore field is set.
    • getNoncurrentTimeBefore

      public com.google.type.Date getNoncurrentTimeBefore()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNoncurrentTimeBefore in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The noncurrentTimeBefore.
    • getNoncurrentTimeBeforeOrBuilder

      public com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNoncurrentTimeBeforeOrBuilder in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
    • getMatchesPrefixList

      public com.google.protobuf.ProtocolStringList getMatchesPrefixList()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesPrefixList in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      A list containing the matchesPrefix.
    • getMatchesPrefixCount

      public int getMatchesPrefixCount()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesPrefixCount in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The count of matchesPrefix.
    • getMatchesPrefix

      public String getMatchesPrefix(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesPrefix in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The matchesPrefix at the given index.
    • getMatchesPrefixBytes

      public com.google.protobuf.ByteString getMatchesPrefixBytes(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesPrefixBytes in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the matchesPrefix at the given index.
    • getMatchesSuffixList

      public com.google.protobuf.ProtocolStringList getMatchesSuffixList()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesSuffixList in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      A list containing the matchesSuffix.
    • getMatchesSuffixCount

      public int getMatchesSuffixCount()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesSuffixCount in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Returns:
      The count of matchesSuffix.
    • getMatchesSuffix

      public String getMatchesSuffix(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesSuffix in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The matchesSuffix at the given index.
    • getMatchesSuffixBytes

      public com.google.protobuf.ByteString getMatchesSuffixBytes(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMatchesSuffixBytes in interface Bucket.Lifecycle.Rule.ConditionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the matchesSuffix at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Bucket.Lifecycle.Rule.Condition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Bucket.Lifecycle.Rule.Condition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Bucket.Lifecycle.Rule.Condition.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Bucket.Lifecycle.Rule.Condition.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Bucket.Lifecycle.Rule.Condition getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Bucket.Lifecycle.Rule.Condition> parser()
    • getParserForType

      public com.google.protobuf.Parser<Bucket.Lifecycle.Rule.Condition> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Bucket.Lifecycle.Rule.Condition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder