Class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1TtlConfig
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1::GoogleFirestoreAdminV1TtlConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.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.
Instance Attribute Summary collapse
-
#expiration_offset ⇒ String
Optional.
-
#state ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleFirestoreAdminV1TtlConfig
constructor
A new instance of GoogleFirestoreAdminV1TtlConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleFirestoreAdminV1TtlConfig
Returns a new instance of GoogleFirestoreAdminV1TtlConfig.
3265 3266 3267 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3265 def initialize(**args) update!(**args) end |
Instance Attribute Details
#expiration_offset ⇒ String
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.
Corresponds to the JSON property expirationOffset
3258 3259 3260 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3258 def expiration_offset @expiration_offset end |
#state ⇒ String
Output only. The state of the TTL configuration.
Corresponds to the JSON property state
3263 3264 3265 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3263 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3270 3271 3272 3273 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3270 def update!(**args) @expiration_offset = args[:expiration_offset] if args.key?(:expiration_offset) @state = args[:state] if args.key?(:state) end |