Class: Google::Apis::FirestoreV1beta1::Precondition

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/firestore_v1beta1/classes.rb,
generated/google/apis/firestore_v1beta1/representations.rb,
generated/google/apis/firestore_v1beta1/representations.rb

Overview

A precondition on a document, used for conditional operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Precondition

Returns a new instance of Precondition



1162
1163
1164
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 1162

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#existsBoolean 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

Returns:

  • (Boolean)


1153
1154
1155
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 1153

def exists
  @exists
end

#update_timeString

When set, the target document must exist and have been last updated at that time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1160
1161
1162
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 1160

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1167
1168
1169
1170
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 1167

def update!(**args)
  @exists = args[:exists] if args.key?(:exists)
  @update_time = args[:update_time] if args.key?(:update_time)
end