# Cloud Firestore V1 API - Class Google::Cloud::Firestore::V1::TransactionOptions (v2.4.0)

2.4.0 (latest) 2.3.0 2.2.1 2.1.1 2.0.1 1.3.0 1.2.0 1.1.1 1.0.0 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.8 Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::TransactionOptions.

Options for creating a new transaction.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #read_only

    def read_only() -> ::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly

**Returns**

- ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadOnly)) --- The transaction can only be used for read operations.


  Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #read_only=

    def read_only=(value) -> ::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadOnly)) --- The transaction can only be used for read operations.


  Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadOnly)) --- The transaction can only be used for read operations.


  Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #read_write

    def read_write() -> ::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite

**Returns**

- ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadWrite)) --- The transaction can be used for both read and write operations.


  Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #read_write=

    def read_write=(value) -> ::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadWrite)) --- The transaction can be used for both read and write operations.


  Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions-ReadWrite)) --- The transaction can be used for both read and write operations.


  Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.