Class: Google::Apis::FirestoreV1::TransactionOptions

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

Options for creating a new transaction.

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

Returns a new instance of TransactionOptions



2356
2357
2358
# File 'generated/google/apis/firestore_v1/classes.rb', line 2356

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

Instance Attribute Details

#read_onlyGoogle::Apis::FirestoreV1::ReadOnly

Options for a transaction that can only be used to read documents. Corresponds to the JSON property readOnly



2349
2350
2351
# File 'generated/google/apis/firestore_v1/classes.rb', line 2349

def read_only
  @read_only
end

#read_writeGoogle::Apis::FirestoreV1::ReadWrite

Options for a transaction that can be used to read and write documents. Corresponds to the JSON property readWrite



2354
2355
2356
# File 'generated/google/apis/firestore_v1/classes.rb', line 2354

def read_write
  @read_write
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2361
2362
2363
2364
# File 'generated/google/apis/firestore_v1/classes.rb', line 2361

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