Class: Google::Apis::FirestoreV1beta1::TransactionOptions

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

Overview

Options for creating a new transaction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TransactionOptions

Returns a new instance of TransactionOptions.



2220
2221
2222
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2220

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

Instance Attribute Details

#read_onlyGoogle::Apis::FirestoreV1beta1::ReadOnly

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



2213
2214
2215
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2213

def read_only
  @read_only
end

#read_writeGoogle::Apis::FirestoreV1beta1::ReadWrite

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



2218
2219
2220
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2218

def read_write
  @read_write
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2225
2226
2227
2228
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2225

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