Class: Google::Apis::FirestoreV1beta1::CommitRequest

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

The request for Firestore.Commit.

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) ⇒ CommitRequest

Returns a new instance of CommitRequest



226
227
228
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 226

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

Instance Attribute Details

#transactionString

If non-empty, applies all writes in this transaction, and commits it. Otherwise, applies the writes as if they were in their own transaction. Corresponds to the JSON property transaction NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


218
219
220
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 218

def transaction
  @transaction
end

#writesArray<Google::Apis::FirestoreV1beta1::Write>

The writes to apply. Always executed atomically and in order. Corresponds to the JSON property writes



224
225
226
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 224

def writes
  @writes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



231
232
233
234
# File 'generated/google/apis/firestore_v1beta1/classes.rb', line 231

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