Class: Google::Apis::FirestoreV1::Precondition

Inherits:
Object
  • Object
show all
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

A precondition on a document, used for conditional operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Precondition

Returns a new instance of Precondition.



3287
3288
3289
# File 'lib/google/apis/firestore_v1/classes.rb', line 3287

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)


3278
3279
3280
# File 'lib/google/apis/firestore_v1/classes.rb', line 3278

def exists
  @exists
end

#update_timeString

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

Returns:

  • (String)


3285
3286
3287
# File 'lib/google/apis/firestore_v1/classes.rb', line 3285

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3292
3293
3294
3295
# File 'lib/google/apis/firestore_v1/classes.rb', line 3292

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