public static final class Field.TtlConfig.Builder extends 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Field.TtlConfig.BuilderImplements
Field.TtlConfigOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Field.TtlConfig build()| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig |
|
buildPartial()
public Field.TtlConfig buildPartial()| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig |
|
clear()
public Field.TtlConfig.Builder clear()| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
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];
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
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 | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public Field.TtlConfig getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getExpirationOffset()
public 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];
| Returns | |
|---|---|
| Type | Description |
Duration |
The expirationOffset. |
getExpirationOffsetBuilder()
public 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];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getExpirationOffsetOrBuilder()
public 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];
| Returns | |
|---|---|
| Type | Description |
DurationOrBuilder |
|
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];
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.State |
The state. |
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];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for state. |
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];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the expirationOffset field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeExpirationOffset(Duration value)
public Field.TtlConfig.Builder mergeExpirationOffset(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];
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
mergeFrom(Field.TtlConfig other)
public Field.TtlConfig.Builder mergeFrom(Field.TtlConfig other)| Parameter | |
|---|---|
| Name | Description |
other |
Field.TtlConfig |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Field.TtlConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Field.TtlConfig.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
setExpirationOffset(Duration value)
public Field.TtlConfig.Builder setExpirationOffset(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];
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
setExpirationOffset(Duration.Builder builderForValue)
public Field.TtlConfig.Builder setExpirationOffset(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];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
|
setState(Field.TtlConfig.State value)
public Field.TtlConfig.Builder setState(Field.TtlConfig.State value)Output only. The state of the TTL configuration.
.google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
Field.TtlConfig.StateThe state to set. |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
This builder for chaining. |
setStateValue(int value)
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];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for state to set. |
| Returns | |
|---|---|
| Type | Description |
Field.TtlConfig.Builder |
This builder for chaining. |