Class: Google::Apis::FirestoreV1::Precondition
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1::Precondition
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/firestore_v1/classes.rb,
generated/google/apis/firestore_v1/representations.rb,
generated/google/apis/firestore_v1/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.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Precondition
Returns a new instance of Precondition.
1812 1813 1814 |
# File 'generated/google/apis/firestore_v1/classes.rb', line 1812 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
1803 1804 1805 |
# File 'generated/google/apis/firestore_v1/classes.rb', line 1803 def exists @exists end |
#update_time ⇒ String
When set, the target document must exist and have been last updated at
that time.
Corresponds to the JSON property updateTime
1810 1811 1812 |
# File 'generated/google/apis/firestore_v1/classes.rb', line 1810 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1817 1818 1819 1820 |
# File 'generated/google/apis/firestore_v1/classes.rb', line 1817 def update!(**args) @exists = args[:exists] if args.key?(:exists) @update_time = args[:update_time] if args.key?(:update_time) end |