Class Field.TtlConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
com.google.firestore.admin.v1.Field.TtlConfig.Builder
All Implemented Interfaces:
Field.TtlConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Field.TtlConfig

public static final class Field.TtlConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder> implements Field.TtlConfigOrBuilder
 The TTL (time-to-live) configuration for documents that have this `Field`
 set.

 A timestamp stored in a TTL-enabled field will be used to determine the
 expiration time of the document. The expiration time is the sum
 of the timestamp value and the `expiration_offset`.

 For Enterprise edition databases, the timestamp value may alternatively be
 stored in an array value in the TTL-enabled field.

 An expiration time in the past indicates that the document is eligible for
 immediate expiration. Using any other data type or leaving the field absent
 will disable expiration for the individual document.
 
Protobuf type google.firestore.admin.v1.Field.TtlConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
    • clear

      public Field.TtlConfig.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
    • getDefaultInstanceForType

      public Field.TtlConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Field.TtlConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Field.TtlConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Field.TtlConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Field.TtlConfig.Builder>
    • mergeFrom

      public Field.TtlConfig.Builder mergeFrom(Field.TtlConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
    • mergeFrom

      public Field.TtlConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Field.TtlConfig.Builder>
      Throws:
      IOException
    • getStateValue

      public int getStateValue()
       Output only. The state of the TTL configuration.
       
      .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface Field.TtlConfigOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Field.TtlConfig.Builder setStateValue(int value)
       Output only. The state of the TTL configuration.
       
      .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public Field.TtlConfig.State getState()
       Output only. The state of the TTL configuration.
       
      .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface Field.TtlConfigOrBuilder
      Returns:
      The state.
    • setState

       Output only. The state of the TTL configuration.
       
      .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Field.TtlConfig.Builder clearState()
       Output only. The state of the TTL configuration.
       
      .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasExpirationOffset

      public boolean hasExpirationOffset()
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasExpirationOffset in interface Field.TtlConfigOrBuilder
      Returns:
      Whether the expirationOffset field is set.
    • getExpirationOffset

      public com.google.protobuf.Duration getExpirationOffset()
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getExpirationOffset in interface Field.TtlConfigOrBuilder
      Returns:
      The expirationOffset.
    • setExpirationOffset

      public Field.TtlConfig.Builder setExpirationOffset(com.google.protobuf.Duration value)
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setExpirationOffset

      public Field.TtlConfig.Builder setExpirationOffset(com.google.protobuf.Duration.Builder builderForValue)
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
    • mergeExpirationOffset

      public Field.TtlConfig.Builder mergeExpirationOffset(com.google.protobuf.Duration value)
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearExpirationOffset

      public Field.TtlConfig.Builder clearExpirationOffset()
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getExpirationOffsetBuilder

      public com.google.protobuf.Duration.Builder getExpirationOffsetBuilder()
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getExpirationOffsetOrBuilder

      public com.google.protobuf.DurationOrBuilder getExpirationOffsetOrBuilder()
       Optional. The offset, relative to the timestamp value from the
       TTL-enabled field, used to determine the document's expiration time.
      
       `expiration_offset.seconds` must be between 0 and 2,147,483,647
       inclusive. Values more precise than seconds are rejected.
      
       If unset, defaults to 0, in which case the expiration time is the same
       as the timestamp value from the TTL-enabled field.
       
      .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getExpirationOffsetOrBuilder in interface Field.TtlConfigOrBuilder