Class: Google::Cloud::Firestore::Admin::V1::Field::TtlConfig
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::Admin::V1::Field::TtlConfig
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/firestore/admin/v1/field.rb
Overview
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.
Defined Under Namespace
Modules: State
Instance Attribute Summary collapse
-
#expiration_offset ⇒ ::Google::Protobuf::Duration
Optional.
-
#state ⇒ ::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig::State
readonly
Output only.
Instance Attribute Details
#expiration_offset ⇒ ::Google::Protobuf::Duration
Returns 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.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'proto_docs/google/firestore/admin/v1/field.rb', line 123 class TtlConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The state of applying the TTL configuration to all documents. module State # The state is unspecified or unknown. STATE_UNSPECIFIED = 0 # The TTL is being applied. There is an active long-running operation to # track the change. Newly written documents will have TTLs applied as # requested. Requested TTLs on existing documents are still being # processed. When TTLs on all existing documents have been processed, the # state will move to 'ACTIVE'. CREATING = 1 # The TTL is active for all documents. ACTIVE = 2 # The TTL configuration could not be enabled for all existing documents. # Newly written documents will continue to have their TTL applied. # The LRO returned when last attempting to enable TTL for this `Field` # has failed, and may have more details. NEEDS_REPAIR = 3 end end |
#state ⇒ ::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig::State (readonly)
Returns Output only. The state of the TTL configuration.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'proto_docs/google/firestore/admin/v1/field.rb', line 123 class TtlConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The state of applying the TTL configuration to all documents. module State # The state is unspecified or unknown. STATE_UNSPECIFIED = 0 # The TTL is being applied. There is an active long-running operation to # track the change. Newly written documents will have TTLs applied as # requested. Requested TTLs on existing documents are still being # processed. When TTLs on all existing documents have been processed, the # state will move to 'ACTIVE'. CREATING = 1 # The TTL is active for all documents. ACTIVE = 2 # The TTL configuration could not be enabled for all existing documents. # Newly written documents will continue to have their TTL applied. # The LRO returned when last attempting to enable TTL for this `Field` # has failed, and may have more details. NEEDS_REPAIR = 3 end end |