Class: Google::Apis::FirestoreV1::TransactionOptions
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1::TransactionOptions
- 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
Options for creating a new transaction.
Instance Attribute Summary collapse
-
#read_only ⇒ Google::Apis::FirestoreV1::ReadOnly
Options for a transaction that can only be used to read documents.
-
#read_write ⇒ Google::Apis::FirestoreV1::ReadWrite
Options for a transaction that can be used to read and write documents.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TransactionOptions
constructor
A new instance of TransactionOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TransactionOptions
Returns a new instance of TransactionOptions.
3946 3947 3948 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3946 def initialize(**args) update!(**args) end |
Instance Attribute Details
#read_only ⇒ Google::Apis::FirestoreV1::ReadOnly
Options for a transaction that can only be used to read documents.
Corresponds to the JSON property readOnly
3937 3938 3939 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3937 def read_only @read_only end |
#read_write ⇒ Google::Apis::FirestoreV1::ReadWrite
Options for a transaction that can be used to read and write documents.
Firestore does not allow 3rd party auth requests to create read-write.
transactions.
Corresponds to the JSON property readWrite
3944 3945 3946 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3944 def read_write @read_write end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3951 3952 3953 3954 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 3951 def update!(**args) @read_only = args[:read_only] if args.key?(:read_only) @read_write = args[:read_write] if args.key?(:read_write) end |