Class: Google::Apis::FirestoreV1beta1::Precondition
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1beta1::Precondition
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1beta1/classes.rb,
lib/google/apis/firestore_v1beta1/representations.rb,
lib/google/apis/firestore_v1beta1/representations.rb
Overview
A precondition on a document, used for conditional operations.
Instance Attribute Summary collapse
-
#exists ⇒ Boolean
(also: #exists?)
When set to
true
, the target document must exist. -
#update_time ⇒ String
When set, the target document must exist and have been last updated at that time.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Precondition
constructor
A new instance of Precondition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Precondition
Returns a new instance of Precondition.
2161 2162 2163 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2161 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exists ⇒ Boolean Also known as: exists?
When set to true
, the target document must exist. When set to false
, the
target document must not exist.
Corresponds to the JSON property exists
2152 2153 2154 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2152 def exists @exists end |
#update_time ⇒ String
When set, the target document must exist and have been last updated at that
time. Timestamp must be microsecond aligned.
Corresponds to the JSON property updateTime
2159 2160 2161 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2159 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2166 2167 2168 2169 |
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2166 def update!(**args) @exists = args[:exists] if args.key?(:exists) @update_time = args[:update_time] if args.key?(:update_time) end |