Package com.google.firestore.admin.v1
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 Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Output only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationOptional.com.google.protobuf.Duration.BuilderOptional.com.google.protobuf.DurationOrBuilderOptional.getState()Output only.intOutput only.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeExpirationOffset(com.google.protobuf.Duration value) Optional.mergeFrom(Field.TtlConfig other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setExpirationOffset(com.google.protobuf.Duration value) Optional.setExpirationOffset(com.google.protobuf.Duration.Builder builderForValue) Optional.setState(Field.TtlConfig.State value) Output only.setStateValue(int value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Field.TtlConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Field.TtlConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getStateValuein interfaceField.TtlConfigOrBuilder- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
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
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:
getStatein interfaceField.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
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:
hasExpirationOffsetin interfaceField.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:
getExpirationOffsetin interfaceField.TtlConfigOrBuilder- Returns:
- The expirationOffset.
-
setExpirationOffset
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
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
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:
getExpirationOffsetOrBuilderin interfaceField.TtlConfigOrBuilder
-