# Google Cloud Spanner v1 API - Class BeginTransactionRequest (5.13.0-beta07)

5.13.0-beta07 5.13.0-beta06 5.12.0 (latest) 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.15.1 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0

    public sealed class BeginTransactionRequest : IMessage<BeginTransactionRequest>, IEquatable<BeginTransactionRequest>, IDeepCloneable<BeginTransactionRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Spanner v1 API class BeginTransactionRequest.

The request for
\[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\].

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BeginTransactionRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BeginTransactionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BeginTransactionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BeginTransactionRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Spanner.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1)

## Assembly

Google.Cloud.Spanner.V1.dll

## Constructors

### BeginTransactionRequest()

    public BeginTransactionRequest()

### BeginTransactionRequest(BeginTransactionRequest)

    public BeginTransactionRequest(BeginTransactionRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest` |

## Properties

### MutationKey

    public Mutation MutationKey { get; set; }

Optional. Required for read-write transactions on a multiplexed session
that commit mutations but don't perform any reads or queries. You must
randomly select one of the mutations from the mutation set and send it as a
part of this request.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` |   |

### Options

    public TransactionOptions Options { get; set; }

Required. Options for the new transaction.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` |   |

### RequestOptions

    public RequestOptions RequestOptions { get; set; }

Common options for this request.
Priority is ignored for this request. Setting the priority in this
`request_options` struct doesn't do anything. To set the priority for a
transaction, set it on the reads and writes that are part of this
transaction instead.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.RequestOptions` |   |

### RoutingHint

    public RoutingHint RoutingHint { get; set; }

Optional. Makes the Spanner requests location-aware if present.

It gives the server hints that can be used to route the request
to an appropriate server, potentially significantly decreasing latency and
improving throughput. To achieve improved performance, most fields must be
filled in with accurate values.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.RoutingHint` |   |

### Session

    public string Session { get; set; }

Required. The session in which the transaction runs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SessionAsSessionName

    public SessionName SessionAsSessionName { get; set; }

[SessionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName)-typed view over the [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest#Google_Cloud_Spanner_V1_BeginTransactionRequest_Session) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` |   |