# Google Cloud Spanner v1 API - Class SpannerClient (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 abstract class SpannerClient

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

Spanner client wrapper, for convenient use.

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

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

## 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

## Remarks

Cloud Spanner API

The Cloud Spanner API can be used to manage sessions and execute
transactions on data stored in Cloud Spanner databases.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Spanner service, which is a host of "spanner.googleapis.com" and a port of 443.

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default Spanner scopes.

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

**Remarks** The default Spanner scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/spanner.data>

### GrpcClient

    public virtual Spanner.SpannerClient GrpcClient { get; }

The underlying gRPC Spanner client

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

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### Settings

    public virtual SpannerSettings Settings { get; protected set; }

Returns the effective [SpannerSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerSettings) used for each API call.
This can be used to create a modified instance of [SpannerSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerSettings) to pass
for a single API request.

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

## Methods

### BatchCreateSessions(DatabaseName, int, CallSettings)

    public virtual BatchCreateSessionsResponse BatchCreateSessions(DatabaseName database, int sessionCount, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(database, sessionCount);

### BatchCreateSessions(BatchCreateSessionsRequest, CallSettings)

    public virtual BatchCreateSessionsResponse BatchCreateSessions(BatchCreateSessionsRequest request, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::BatchCreateSessionsRequest request = new gcsv::BatchCreateSessionsRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        SessionTemplate = new gcsv::Session(),
        SessionCount = 0,
    };
    // Make the request
    gcsv::BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(request);

### BatchCreateSessions(string, int, CallSettings)

    public virtual BatchCreateSessionsResponse BatchCreateSessions(string database, int sessionCount, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(database, sessionCount);

### BatchCreateSessionsAsync(DatabaseName, int, CallSettings)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(DatabaseName database, int sessionCount, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount);

### BatchCreateSessionsAsync(DatabaseName, int, CancellationToken)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(DatabaseName database, int sessionCount, CancellationToken cancellationToken)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount);

### BatchCreateSessionsAsync(BatchCreateSessionsRequest, CallSettings)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(BatchCreateSessionsRequest request, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::BatchCreateSessionsRequest request = new gcsv::BatchCreateSessionsRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        SessionTemplate = new gcsv::Session(),
        SessionCount = 0,
    };
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(request);

### BatchCreateSessionsAsync(BatchCreateSessionsRequest, CancellationToken)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(BatchCreateSessionsRequest request, CancellationToken cancellationToken)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::BatchCreateSessionsRequest request = new gcsv::BatchCreateSessionsRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        SessionTemplate = new gcsv::Session(),
        SessionCount = 0,
    };
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(request);

### BatchCreateSessionsAsync(string, int, CallSettings)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(string database, int sessionCount, CallSettings callSettings = null)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount);

### BatchCreateSessionsAsync(string, int, CancellationToken)

    public virtual Task<BatchCreateSessionsResponse> BatchCreateSessionsAsync(string database, int sessionCount, CancellationToken cancellationToken)

Creates multiple new sessions.

This API can be used to initialize a session cache on the clients.
See <https://goo.gl/TgSFN2> for best practices on session cache management.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new sessions are created. |
| `sessionCount` | `https://learn.microsoft.com/dotnet/api/system.int32` Required. The number of sessions to be created in this batch call. At least one session is created. The API can return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to `BatchCreateSessions` (adjusting \[session_count\]\[google.spanner.v1.BatchCreateSessionsRequest.session_count\] as necessary). |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchCreateSessionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    int sessionCount = 0;
    // Make the request
    gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount);

### BatchWrite(BatchWriteRequest, CallSettings)

    public virtual SpannerClient.BatchWriteStream BatchWrite(BatchWriteRequest request, CallSettings callSettings = null)

Batches the supplied mutation groups in a collection of efficient
transactions. All mutations in a group are committed atomically. However,
mutations across groups can be committed non-atomically in an unspecified
order and thus, they must be independent of each other. Partial failure is
possible, that is, some groups might have been committed successfully,
while some might have failed. The results of individual batches are
streamed into the response as the batches are applied.

`BatchWrite` requests are not replay protected, meaning that each mutation
group can be applied more than once. Replays of non-idempotent mutations
can have undesirable effects. For example, replays of an insert mutation
can produce an already exists error or if you use generated or commit
timestamp-based keys, it can result in additional rows being added to the
mutation's table. We recommend structuring your mutation groups to be
idempotent to avoid this issue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.BatchWriteStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::BatchWriteRequest request = new gcsv::BatchWriteRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        RequestOptions = new gcsv::RequestOptions(),
        MutationGroups =
        {
            new gcsv::BatchWriteRequest.Types.MutationGroup(),
        },
        ExcludeTxnFromChangeStreams = false,
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(request);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::BatchWriteResponse> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::BatchWriteResponse responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### BatchWrite(SessionName, IEnumerable\<MutationGroup\>, CallSettings)

    public virtual SpannerClient.BatchWriteStream BatchWrite(SessionName session, IEnumerable<BatchWriteRequest.Types.MutationGroup> mutationGroups, CallSettings callSettings = null)

Batches the supplied mutation groups in a collection of efficient
transactions. All mutations in a group are committed atomically. However,
mutations across groups can be committed non-atomically in an unspecified
order and thus, they must be independent of each other. Partial failure is
possible, that is, some groups might have been committed successfully,
while some might have failed. The results of individual batches are
streamed into the response as the batches are applied.

`BatchWrite` requests are not replay protected, meaning that each mutation
group can be applied more than once. Replays of non-idempotent mutations
can have undesirable effects. For example, replays of an insert mutation
can produce an already exists error or if you use generated or commit
timestamp-based keys, it can result in additional rows being added to the
mutation's table. We recommend structuring your mutation groups to be
idempotent to avoid this issue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the batch request is to be run. |
| `mutationGroups` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequest.Types.MutationGroup` Required. The groups of mutations to be applied. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.BatchWriteStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    IEnumerable<gcsv::BatchWriteRequest.Types.MutationGroup> mutationGroups = new gcsv::BatchWriteRequest.Types.MutationGroup[]
    {
        new gcsv::BatchWriteRequest.Types.MutationGroup(),
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(session, mutationGroups);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::BatchWriteResponse> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::BatchWriteResponse responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### BatchWrite(string, IEnumerable\<MutationGroup\>, CallSettings)

    public virtual SpannerClient.BatchWriteStream BatchWrite(string session, IEnumerable<BatchWriteRequest.Types.MutationGroup> mutationGroups, CallSettings callSettings = null)

Batches the supplied mutation groups in a collection of efficient
transactions. All mutations in a group are committed atomically. However,
mutations across groups can be committed non-atomically in an unspecified
order and thus, they must be independent of each other. Partial failure is
possible, that is, some groups might have been committed successfully,
while some might have failed. The results of individual batches are
streamed into the response as the batches are applied.

`BatchWrite` requests are not replay protected, meaning that each mutation
group can be applied more than once. Replays of non-idempotent mutations
can have undesirable effects. For example, replays of an insert mutation
can produce an already exists error or if you use generated or commit
timestamp-based keys, it can result in additional rows being added to the
mutation's table. We recommend structuring your mutation groups to be
idempotent to avoid this issue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the batch request is to be run. |
| `mutationGroups` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BatchWriteRequest.Types.MutationGroup` Required. The groups of mutations to be applied. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.BatchWriteStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    IEnumerable<gcsv::BatchWriteRequest.Types.MutationGroup> mutationGroups = new gcsv::BatchWriteRequest.Types.MutationGroup[]
    {
        new gcsv::BatchWriteRequest.Types.MutationGroup(),
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(session, mutationGroups);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::BatchWriteResponse> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::BatchWriteResponse responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### BeginTransaction(BeginTransactionRequest, CallSettings)

    public virtual Transaction BeginTransaction(BeginTransactionRequest request, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::BeginTransactionRequest request = new gcsv::BeginTransactionRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Options = new gcsv::TransactionOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        MutationKey = new gcsv::Mutation(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::Transaction response = spannerClient.BeginTransaction(request);

### BeginTransaction(SessionName, TransactionOptions, CallSettings)

    public virtual Transaction BeginTransaction(SessionName session, TransactionOptions options, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = spannerClient.BeginTransaction(session, options);

### BeginTransaction(string, TransactionOptions, CallSettings)

    public virtual Transaction BeginTransaction(string session, TransactionOptions options, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = spannerClient.BeginTransaction(session, options);

### BeginTransactionAsync(BeginTransactionRequest, CallSettings)

    public virtual Task<Transaction> BeginTransactionAsync(BeginTransactionRequest request, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::BeginTransactionRequest request = new gcsv::BeginTransactionRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Options = new gcsv::TransactionOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        MutationKey = new gcsv::Mutation(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(request);

### BeginTransactionAsync(BeginTransactionRequest, CancellationToken)

    public virtual Task<Transaction> BeginTransactionAsync(BeginTransactionRequest request, CancellationToken cancellationToken)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.BeginTransactionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::BeginTransactionRequest request = new gcsv::BeginTransactionRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Options = new gcsv::TransactionOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        MutationKey = new gcsv::Mutation(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(request);

### BeginTransactionAsync(SessionName, TransactionOptions, CallSettings)

    public virtual Task<Transaction> BeginTransactionAsync(SessionName session, TransactionOptions options, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(session, options);

### BeginTransactionAsync(SessionName, TransactionOptions, CancellationToken)

    public virtual Task<Transaction> BeginTransactionAsync(SessionName session, TransactionOptions options, CancellationToken cancellationToken)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(session, options);

### BeginTransactionAsync(string, TransactionOptions, CallSettings)

    public virtual Task<Transaction> BeginTransactionAsync(string session, TransactionOptions options, CallSettings callSettings = null)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(session, options);

### BeginTransactionAsync(string, TransactionOptions, CancellationToken)

    public virtual Task<Transaction> BeginTransactionAsync(string session, TransactionOptions options, CancellationToken cancellationToken)

Begins a new transaction. This step can often be skipped:
\[Read\]\[google.spanner.v1.Spanner.Read\],
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] and
\[Commit\]\[google.spanner.v1.Spanner.Commit\] can begin a new transaction as a
side-effect.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction runs. |
| `options` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Required. Options for the new transaction. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Transaction` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions options = new gcsv::TransactionOptions();
    // Make the request
    gcsv::Transaction response = await spannerClient.BeginTransactionAsync(session, options);

### Commit(CommitRequest, CallSettings)

    public virtual CommitResponse Commit(CommitRequest request, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::CommitRequest request = new gcsv::CommitRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
        Mutations =
        {
            new gcsv::Mutation(),
        },
        ReturnCommitStats = false,
        RequestOptions = new gcsv::RequestOptions(),
        MaxCommitDelay = new Duration(),
        PrecommitToken = new gcsv::MultiplexedSessionPrecommitToken(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::CommitResponse response = spannerClient.Commit(request);

### Commit(SessionName, TransactionOptions, IEnumerable\<Mutation\>, CallSettings)

    public virtual CommitResponse Commit(SessionName session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations);

### Commit(SessionName, ByteString, IEnumerable\<Mutation\>, CallSettings)

    public virtual CommitResponse Commit(SessionName session, ByteString transactionId, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = spannerClient.Commit(session, transactionId, mutations);

### Commit(string, TransactionOptions, IEnumerable\<Mutation\>, CallSettings)

    public virtual CommitResponse Commit(string session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations);

### Commit(string, ByteString, IEnumerable\<Mutation\>, CallSettings)

    public virtual CommitResponse Commit(string session, ByteString transactionId, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = spannerClient.Commit(session, transactionId, mutations);

### CommitAsync(CommitRequest, CallSettings)

    public virtual Task<CommitResponse> CommitAsync(CommitRequest request, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::CommitRequest request = new gcsv::CommitRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
        Mutations =
        {
            new gcsv::Mutation(),
        },
        ReturnCommitStats = false,
        RequestOptions = new gcsv::RequestOptions(),
        MaxCommitDelay = new Duration(),
        PrecommitToken = new gcsv::MultiplexedSessionPrecommitToken(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(request);

### CommitAsync(CommitRequest, CancellationToken)

    public virtual Task<CommitResponse> CommitAsync(CommitRequest request, CancellationToken cancellationToken)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::CommitRequest request = new gcsv::CommitRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
        Mutations =
        {
            new gcsv::Mutation(),
        },
        ReturnCommitStats = false,
        RequestOptions = new gcsv::RequestOptions(),
        MaxCommitDelay = new Duration(),
        PrecommitToken = new gcsv::MultiplexedSessionPrecommitToken(),
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(request);

### CommitAsync(SessionName, TransactionOptions, IEnumerable\<Mutation\>, CallSettings)

    public virtual Task<CommitResponse> CommitAsync(SessionName session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations);

### CommitAsync(SessionName, TransactionOptions, IEnumerable\<Mutation\>, CancellationToken)

    public virtual Task<CommitResponse> CommitAsync(SessionName session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CancellationToken cancellationToken)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations);

### CommitAsync(SessionName, ByteString, IEnumerable\<Mutation\>, CallSettings)

    public virtual Task<CommitResponse> CommitAsync(SessionName session, ByteString transactionId, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations);

### CommitAsync(SessionName, ByteString, IEnumerable\<Mutation\>, CancellationToken)

    public virtual Task<CommitResponse> CommitAsync(SessionName session, ByteString transactionId, IEnumerable<Mutation> mutations, CancellationToken cancellationToken)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations);

### CommitAsync(string, TransactionOptions, IEnumerable\<Mutation\>, CallSettings)

    public virtual Task<CommitResponse> CommitAsync(string session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations);

### CommitAsync(string, TransactionOptions, IEnumerable\<Mutation\>, CancellationToken)

    public virtual Task<CommitResponse> CommitAsync(string session, TransactionOptions singleUseTransaction, IEnumerable<Mutation> mutations, CancellationToken cancellationToken)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `singleUseTransaction` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionOptions` Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it's possible that the mutations are executed more than once. If this is undesirable, use \[BeginTransaction\]\[google.spanner.v1.Spanner.BeginTransaction\] and \[Commit\]\[google.spanner.v1.Spanner.Commit\] instead. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    gcsv::TransactionOptions singleUseTransaction = new gcsv::TransactionOptions();
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations);

### CommitAsync(string, ByteString, IEnumerable\<Mutation\>, CallSettings)

    public virtual Task<CommitResponse> CommitAsync(string session, ByteString transactionId, IEnumerable<Mutation> mutations, CallSettings callSettings = null)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations);

### CommitAsync(string, ByteString, IEnumerable\<Mutation\>, CancellationToken)

    public virtual Task<CommitResponse> CommitAsync(string session, ByteString transactionId, IEnumerable<Mutation> mutations, CancellationToken cancellationToken)

Commits a transaction. The request includes the mutations to be
applied to rows in the database.

`Commit` might return an `ABORTED` error. This can occur at any time;
commonly, the cause is conflicts with concurrent
transactions. However, it can also happen for a variety of other
reasons. If `Commit` returns `ABORTED`, the caller should retry
the transaction from the beginning, reusing the same session.

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
for example, if the client job experiences a 1+ hour networking failure.
At that point, Cloud Spanner has lost track of the transaction outcome and
we recommend that you perform another read from the database to see the
state of things as they are now.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to be committed is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Commit a previously-started transaction. |
| `mutations` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Mutation` The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CommitResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    IEnumerable<gcsv::Mutation> mutations = new gcsv::Mutation[]
    {
        new gcsv::Mutation(),
    };
    // Make the request
    gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations);

### Create()

    public static SpannerClient Create()

Synchronously creates a [SpannerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient) using the default credentials, endpoint and settings. To
specify custom credentials or other settings, use [SpannerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient` | The created [SpannerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient). |

### CreateAsync(CancellationToken)

    public static Task<SpannerClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [SpannerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [SpannerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient` | The task representing the created [SpannerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient). |

### CreateSession(DatabaseName, CallSettings)

    public virtual Session CreateSession(DatabaseName database, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new session is created. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request
    gcsv::Session response = spannerClient.CreateSession(database);

### CreateSession(CreateSessionRequest, CallSettings)

    public virtual Session CreateSession(CreateSessionRequest request, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CreateSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::CreateSessionRequest request = new gcsv::CreateSessionRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        Session = new gcsv::Session(),
    };
    // Make the request
    gcsv::Session response = spannerClient.CreateSession(request);

### CreateSession(string, CallSettings)

    public virtual Session CreateSession(string database, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new session is created. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request
    gcsv::Session response = spannerClient.CreateSession(database);

### CreateSessionAsync(DatabaseName, CallSettings)

    public virtual Task<Session> CreateSessionAsync(DatabaseName database, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new session is created. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(database);

### CreateSessionAsync(DatabaseName, CancellationToken)

    public virtual Task<Session> CreateSessionAsync(DatabaseName database, CancellationToken cancellationToken)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which the new session is created. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(database);

### CreateSessionAsync(CreateSessionRequest, CallSettings)

    public virtual Task<Session> CreateSessionAsync(CreateSessionRequest request, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CreateSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::CreateSessionRequest request = new gcsv::CreateSessionRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        Session = new gcsv::Session(),
    };
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(request);

### CreateSessionAsync(CreateSessionRequest, CancellationToken)

    public virtual Task<Session> CreateSessionAsync(CreateSessionRequest request, CancellationToken cancellationToken)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.CreateSessionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::CreateSessionRequest request = new gcsv::CreateSessionRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        Session = new gcsv::Session(),
    };
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(request);

### CreateSessionAsync(string, CallSettings)

    public virtual Task<Session> CreateSessionAsync(string database, CallSettings callSettings = null)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new session is created. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(database);

### CreateSessionAsync(string, CancellationToken)

    public virtual Task<Session> CreateSessionAsync(string database, CancellationToken cancellationToken)

Creates a new session. A session can be used to perform
transactions that read and/or modify data in a Cloud Spanner database.
Sessions are meant to be reused for many consecutive
transactions.

Sessions can only execute one transaction at a time. To execute
multiple concurrent read-write/write-only transactions, create
multiple sessions. Note that standalone reads and queries use a
transaction internally, and count toward the one transaction
limit.

Active sessions use additional server resources, so it's a good idea to
delete idle and unneeded sessions.
Aside from explicit deletes, Cloud Spanner can delete sessions when no
operations are sent for more than an hour. If a session is deleted,
requests to it return `NOT_FOUND`.

Idle sessions can be kept alive by sending a trivial SQL query
periodically, for example, `"SELECT 1"`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which the new session is created. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request
    gcsv::Session response = await spannerClient.CreateSessionAsync(database);

### DeleteSession(DeleteSessionRequest, CallSettings)

    public virtual void DeleteSession(DeleteSessionRequest request, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DeleteSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::DeleteSessionRequest request = new gcsv::DeleteSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    spannerClient.DeleteSession(request);

### DeleteSession(SessionName, CallSettings)

    public virtual void DeleteSession(SessionName name, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to delete. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    spannerClient.DeleteSession(name);

### DeleteSession(string, CallSettings)

    public virtual void DeleteSession(string name, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to delete. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    spannerClient.DeleteSession(name);

### DeleteSessionAsync(DeleteSessionRequest, CallSettings)

    public virtual Task DeleteSessionAsync(DeleteSessionRequest request, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DeleteSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::DeleteSessionRequest request = new gcsv::DeleteSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    await spannerClient.DeleteSessionAsync(request);

### DeleteSessionAsync(DeleteSessionRequest, CancellationToken)

    public virtual Task DeleteSessionAsync(DeleteSessionRequest request, CancellationToken cancellationToken)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.DeleteSessionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::DeleteSessionRequest request = new gcsv::DeleteSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    await spannerClient.DeleteSessionAsync(request);

### DeleteSessionAsync(SessionName, CallSettings)

    public virtual Task DeleteSessionAsync(SessionName name, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to delete. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    await spannerClient.DeleteSessionAsync(name);

### DeleteSessionAsync(SessionName, CancellationToken)

    public virtual Task DeleteSessionAsync(SessionName name, CancellationToken cancellationToken)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to delete. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    await spannerClient.DeleteSessionAsync(name);

### DeleteSessionAsync(string, CallSettings)

    public virtual Task DeleteSessionAsync(string name, CallSettings callSettings = null)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to delete. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    await spannerClient.DeleteSessionAsync(name);

### DeleteSessionAsync(string, CancellationToken)

    public virtual Task DeleteSessionAsync(string name, CancellationToken cancellationToken)

Ends a session, releasing server resources associated with it. This
asynchronously triggers the cancellation of any operations that are running
with this session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to delete. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    await spannerClient.DeleteSessionAsync(name);

### ExecuteBatchDml(ExecuteBatchDmlRequest, CallSettings)

    public virtual ExecuteBatchDmlResponse ExecuteBatchDml(ExecuteBatchDmlRequest request, CallSettings callSettings = null)

Executes a batch of SQL DML statements. This method allows many statements
to be run with lower latency than submitting them sequentially with
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\].

Statements are executed in sequential order. A request can succeed even if
a statement fails. The
\[ExecuteBatchDmlResponse.status\]\[google.spanner.v1.ExecuteBatchDmlResponse.status\]
field in the response provides information about the statement that failed.
Clients must inspect this field to determine whether an error occurred.

Execution stops after the first failed statement; the remaining statements
are not executed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ExecuteBatchDmlRequest request = new gcsv::ExecuteBatchDmlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Statements =
        {
            new gcsv::ExecuteBatchDmlRequest.Types.Statement(),
        },
        Seqno = 0L,
        RequestOptions = new gcsv::RequestOptions(),
        LastStatements = false,
    };
    // Make the request
    gcsv::ExecuteBatchDmlResponse response = spannerClient.ExecuteBatchDml(request);

### ExecuteBatchDmlAsync(ExecuteBatchDmlRequest, CallSettings)

    public virtual Task<ExecuteBatchDmlResponse> ExecuteBatchDmlAsync(ExecuteBatchDmlRequest request, CallSettings callSettings = null)

Executes a batch of SQL DML statements. This method allows many statements
to be run with lower latency than submitting them sequentially with
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\].

Statements are executed in sequential order. A request can succeed even if
a statement fails. The
\[ExecuteBatchDmlResponse.status\]\[google.spanner.v1.ExecuteBatchDmlResponse.status\]
field in the response provides information about the statement that failed.
Clients must inspect this field to determine whether an error occurred.

Execution stops after the first failed statement; the remaining statements
are not executed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ExecuteBatchDmlRequest request = new gcsv::ExecuteBatchDmlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Statements =
        {
            new gcsv::ExecuteBatchDmlRequest.Types.Statement(),
        },
        Seqno = 0L,
        RequestOptions = new gcsv::RequestOptions(),
        LastStatements = false,
    };
    // Make the request
    gcsv::ExecuteBatchDmlResponse response = await spannerClient.ExecuteBatchDmlAsync(request);

### ExecuteBatchDmlAsync(ExecuteBatchDmlRequest, CancellationToken)

    public virtual Task<ExecuteBatchDmlResponse> ExecuteBatchDmlAsync(ExecuteBatchDmlRequest request, CancellationToken cancellationToken)

Executes a batch of SQL DML statements. This method allows many statements
to be run with lower latency than submitting them sequentially with
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\].

Statements are executed in sequential order. A request can succeed even if
a statement fails. The
\[ExecuteBatchDmlResponse.status\]\[google.spanner.v1.ExecuteBatchDmlResponse.status\]
field in the response provides information about the statement that failed.
Clients must inspect this field to determine whether an error occurred.

Execution stops after the first failed statement; the remaining statements
are not executed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ExecuteBatchDmlRequest request = new gcsv::ExecuteBatchDmlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Statements =
        {
            new gcsv::ExecuteBatchDmlRequest.Types.Statement(),
        },
        Seqno = 0L,
        RequestOptions = new gcsv::RequestOptions(),
        LastStatements = false,
    };
    // Make the request
    gcsv::ExecuteBatchDmlResponse response = await spannerClient.ExecuteBatchDmlAsync(request);

### ExecuteSql(ExecuteSqlRequest, CallSettings)

    public virtual ResultSet ExecuteSql(ExecuteSqlRequest request, CallSettings callSettings = null)

Executes an SQL statement, returning all results in a single reply. This
method can't be used to return a result set larger than 10 MiB;
if the query yields more data than that, the query fails with
a `FAILED_PRECONDITION` error.

Operations inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be fetched in streaming fashion by calling
\[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\]
instead.

The query string can be SQL or [Graph Query Language
(GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteSqlRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ExecuteSqlRequest request = new gcsv::ExecuteSqlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        ResumeToken = ByteString.Empty,
        QueryMode = gcsv::ExecuteSqlRequest.Types.QueryMode.Normal,
        PartitionToken = ByteString.Empty,
        Seqno = 0L,
        QueryOptions = new gcsv::ExecuteSqlRequest.Types.QueryOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        LastStatement = false,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = spannerClient.ExecuteSql(request);

### ExecuteSqlAsync(ExecuteSqlRequest, CallSettings)

    public virtual Task<ResultSet> ExecuteSqlAsync(ExecuteSqlRequest request, CallSettings callSettings = null)

Executes an SQL statement, returning all results in a single reply. This
method can't be used to return a result set larger than 10 MiB;
if the query yields more data than that, the query fails with
a `FAILED_PRECONDITION` error.

Operations inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be fetched in streaming fashion by calling
\[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\]
instead.

The query string can be SQL or [Graph Query Language
(GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteSqlRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ExecuteSqlRequest request = new gcsv::ExecuteSqlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        ResumeToken = ByteString.Empty,
        QueryMode = gcsv::ExecuteSqlRequest.Types.QueryMode.Normal,
        PartitionToken = ByteString.Empty,
        Seqno = 0L,
        QueryOptions = new gcsv::ExecuteSqlRequest.Types.QueryOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        LastStatement = false,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = await spannerClient.ExecuteSqlAsync(request);

### ExecuteSqlAsync(ExecuteSqlRequest, CancellationToken)

    public virtual Task<ResultSet> ExecuteSqlAsync(ExecuteSqlRequest request, CancellationToken cancellationToken)

Executes an SQL statement, returning all results in a single reply. This
method can't be used to return a result set larger than 10 MiB;
if the query yields more data than that, the query fails with
a `FAILED_PRECONDITION` error.

Operations inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be fetched in streaming fashion by calling
\[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\]
instead.

The query string can be SQL or [Graph Query Language
(GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteSqlRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ExecuteSqlRequest request = new gcsv::ExecuteSqlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        ResumeToken = ByteString.Empty,
        QueryMode = gcsv::ExecuteSqlRequest.Types.QueryMode.Normal,
        PartitionToken = ByteString.Empty,
        Seqno = 0L,
        QueryOptions = new gcsv::ExecuteSqlRequest.Types.QueryOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        LastStatement = false,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = await spannerClient.ExecuteSqlAsync(request);

### ExecuteStreamingSql(ExecuteSqlRequest, CallSettings)

    public virtual SpannerClient.ExecuteStreamingSqlStream ExecuteStreamingSql(ExecuteSqlRequest request, CallSettings callSettings = null)

Like \[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\], except returns the
result set as a stream. Unlike
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\], there is no limit on
the size of the returned result set. However, no individual row in the
result set can exceed 100 MiB, and no column value can exceed 10 MiB.

The query string can be SQL or [Graph Query Language
(GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteSqlRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.ExecuteStreamingSqlStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ExecuteSqlRequest request = new gcsv::ExecuteSqlRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        ResumeToken = ByteString.Empty,
        QueryMode = gcsv::ExecuteSqlRequest.Types.QueryMode.Normal,
        PartitionToken = ByteString.Empty,
        Seqno = 0L,
        QueryOptions = new gcsv::ExecuteSqlRequest.Types.QueryOptions(),
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        LastStatement = false,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.ExecuteStreamingSqlStream response = spannerClient.ExecuteStreamingSql(request);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::PartialResultSet> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::PartialResultSet responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### FetchCacheUpdate(DatabaseName, CallSettings)

    public virtual SpannerClient.FetchCacheUpdateStream FetchCacheUpdate(DatabaseName database, CallSettings callSettings = null)

Retrieves a cache update for a given database.

This RPC can be used to warm up the client cache by fetching key recipes
and server information for a given database. It is recommended to call
this RPC at the beginning of the client's lifecycle, prior to any other
data plane operations.

The cache update is returned as a stream because the response can be too
large to fit into a single `CacheUpdate` message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database for which to retrieve the cache update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.FetchCacheUpdateStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.FetchCacheUpdateStream response = spannerClient.FetchCacheUpdate(database);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::CacheUpdate> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::CacheUpdate responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### FetchCacheUpdate(FetchCacheUpdateRequest, CallSettings)

    public virtual SpannerClient.FetchCacheUpdateStream FetchCacheUpdate(FetchCacheUpdateRequest request, CallSettings callSettings = null)

Retrieves a cache update for a given database.

This RPC can be used to warm up the client cache by fetching key recipes
and server information for a given database. It is recommended to call
this RPC at the beginning of the client's lifecycle, prior to any other
data plane operations.

The cache update is returned as a stream because the response can be too
large to fit into a single `CacheUpdate` message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.FetchCacheUpdateRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.FetchCacheUpdateStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::FetchCacheUpdateRequest request = new gcsv::FetchCacheUpdateRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        MaxRecipeCount = 0,
        MaxRangeCount = 0,
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.FetchCacheUpdateStream response = spannerClient.FetchCacheUpdate(request);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::CacheUpdate> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::CacheUpdate responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### FetchCacheUpdate(string, CallSettings)

    public virtual SpannerClient.FetchCacheUpdateStream FetchCacheUpdate(string database, CallSettings callSettings = null)

Retrieves a cache update for a given database.

This RPC can be used to warm up the client cache by fetching key recipes
and server information for a given database. It is recommended to call
this RPC at the beginning of the client's lifecycle, prior to any other
data plane operations.

The cache update is returned as a stream because the response can be too
large to fit into a single `CacheUpdate` message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database for which to retrieve the cache update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.FetchCacheUpdateStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.FetchCacheUpdateStream response = spannerClient.FetchCacheUpdate(database);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::CacheUpdate> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::CacheUpdate responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed

### GetSession(GetSessionRequest, CallSettings)

    public virtual Session GetSession(GetSessionRequest request, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.GetSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::GetSessionRequest request = new gcsv::GetSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    gcsv::Session response = spannerClient.GetSession(request);

### GetSession(SessionName, CallSettings)

    public virtual Session GetSession(SessionName name, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    gcsv::Session response = spannerClient.GetSession(name);

### GetSession(string, CallSettings)

    public virtual Session GetSession(string name, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    gcsv::Session response = spannerClient.GetSession(name);

### GetSessionAsync(GetSessionRequest, CallSettings)

    public virtual Task<Session> GetSessionAsync(GetSessionRequest request, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.GetSessionRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::GetSessionRequest request = new gcsv::GetSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(request);

### GetSessionAsync(GetSessionRequest, CancellationToken)

    public virtual Task<Session> GetSessionAsync(GetSessionRequest request, CancellationToken cancellationToken)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.GetSessionRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::GetSessionRequest request = new gcsv::GetSessionRequest
    {
        SessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
    };
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(request);

### GetSessionAsync(SessionName, CallSettings)

    public virtual Task<Session> GetSessionAsync(SessionName name, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(name);

### GetSessionAsync(SessionName, CancellationToken)

    public virtual Task<Session> GetSessionAsync(SessionName name, CancellationToken cancellationToken)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The name of the session to retrieve. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName name = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(name);

### GetSessionAsync(string, CallSettings)

    public virtual Task<Session> GetSessionAsync(string name, CallSettings callSettings = null)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(name);

### GetSessionAsync(string, CancellationToken)

    public virtual Task<Session> GetSessionAsync(string name, CancellationToken cancellationToken)

Gets a session. Returns `NOT_FOUND` if the session doesn't exist.
This is mainly useful for determining whether a session is still
alive.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the session to retrieve. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    // Make the request
    gcsv::Session response = await spannerClient.GetSessionAsync(name);

### ListSessions(DatabaseName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(DatabaseName database, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which to list sessions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request
    PagedEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessions(database);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSessions(ListSessionsRequest, CallSettings)

    public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(ListSessionsRequest request, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ListSessionsRequest request = new gcsv::ListSessionsRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessions(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSessions(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(string database, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which to list sessions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request
    PagedEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessions(database);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSessionsAsync(DatabaseName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(DatabaseName database, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `Google.Cloud.Spanner.Common.V1.DatabaseName` Required. The database in which to list sessions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable asynchronous sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]");
    // Make the request
    PagedAsyncEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessionsAsync(database);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSessionsAsync(ListSessionsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(ListSessionsRequest request, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable asynchronous sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ListSessionsRequest request = new gcsv::ListSessionsRequest
    {
        DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessionsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSessionsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(string database, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all sessions in a given database.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `database` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The database in which to list sessions. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ListSessionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session` | A pageable asynchronous sequence of [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.Session) resources. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]";
    // Make the request
    PagedAsyncEnumerable<gcsv::ListSessionsResponse, gcsv::Session> response = spannerClient.ListSessionsAsync(database);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gcsv::Session item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (gcsv::ListSessionsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcsv::Session item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gcsv::Session> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gcsv::Session item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PartitionQuery(PartitionQueryRequest, CallSettings)

    public virtual PartitionResponse PartitionQuery(PartitionQueryRequest request, CallSettings callSettings = null)

Creates a set of partition tokens that can be used to execute a query
operation in parallel. Each of the returned partition tokens can be used
by \[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\] to
specify a subset of the query result to read. The same session and
read-only transaction must be used by the `PartitionQueryRequest` used to
create the partition tokens and the `ExecuteSqlRequests` that use the
partition tokens.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the query, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::PartitionQueryRequest request = new gcsv::PartitionQueryRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = spannerClient.PartitionQuery(request);

### PartitionQueryAsync(PartitionQueryRequest, CallSettings)

    public virtual Task<PartitionResponse> PartitionQueryAsync(PartitionQueryRequest request, CallSettings callSettings = null)

Creates a set of partition tokens that can be used to execute a query
operation in parallel. Each of the returned partition tokens can be used
by \[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\] to
specify a subset of the query result to read. The same session and
read-only transaction must be used by the `PartitionQueryRequest` used to
create the partition tokens and the `ExecuteSqlRequests` that use the
partition tokens.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the query, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::PartitionQueryRequest request = new gcsv::PartitionQueryRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = await spannerClient.PartitionQueryAsync(request);

### PartitionQueryAsync(PartitionQueryRequest, CancellationToken)

    public virtual Task<PartitionResponse> PartitionQueryAsync(PartitionQueryRequest request, CancellationToken cancellationToken)

Creates a set of partition tokens that can be used to execute a query
operation in parallel. Each of the returned partition tokens can be used
by \[ExecuteStreamingSql\]\[google.spanner.v1.Spanner.ExecuteStreamingSql\] to
specify a subset of the query result to read. The same session and
read-only transaction must be used by the `PartitionQueryRequest` used to
create the partition tokens and the `ExecuteSqlRequests` that use the
partition tokens.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the query, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::PartitionQueryRequest request = new gcsv::PartitionQueryRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Sql = "",
        Params = new Struct(),
        ParamTypes =
        {
            {
                "",
                new gcsv::Type()
            },
        },
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = await spannerClient.PartitionQueryAsync(request);

### PartitionRead(PartitionReadRequest, CallSettings)

    public virtual PartitionResponse PartitionRead(PartitionReadRequest request, CallSettings callSettings = null)

Creates a set of partition tokens that can be used to execute a read
operation in parallel. Each of the returned partition tokens can be used
by \[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] to specify a
subset of the read result to read. The same session and read-only
transaction must be used by the `PartitionReadRequest` used to create the
partition tokens and the `ReadRequests` that use the partition tokens.
There are no ordering guarantees on rows returned among the returned
partition tokens, or even within each individual `StreamingRead` call
issued with a `partition_token`.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the read, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::PartitionReadRequest request = new gcsv::PartitionReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = spannerClient.PartitionRead(request);

### PartitionReadAsync(PartitionReadRequest, CallSettings)

    public virtual Task<PartitionResponse> PartitionReadAsync(PartitionReadRequest request, CallSettings callSettings = null)

Creates a set of partition tokens that can be used to execute a read
operation in parallel. Each of the returned partition tokens can be used
by \[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] to specify a
subset of the read result to read. The same session and read-only
transaction must be used by the `PartitionReadRequest` used to create the
partition tokens and the `ReadRequests` that use the partition tokens.
There are no ordering guarantees on rows returned among the returned
partition tokens, or even within each individual `StreamingRead` call
issued with a `partition_token`.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the read, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::PartitionReadRequest request = new gcsv::PartitionReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = await spannerClient.PartitionReadAsync(request);

### PartitionReadAsync(PartitionReadRequest, CancellationToken)

    public virtual Task<PartitionResponse> PartitionReadAsync(PartitionReadRequest request, CancellationToken cancellationToken)

Creates a set of partition tokens that can be used to execute a read
operation in parallel. Each of the returned partition tokens can be used
by \[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] to specify a
subset of the read result to read. The same session and read-only
transaction must be used by the `PartitionReadRequest` used to create the
partition tokens and the `ReadRequests` that use the partition tokens.
There are no ordering guarantees on rows returned among the returned
partition tokens, or even within each individual `StreamingRead` call
issued with a `partition_token`.

Partition tokens become invalid when the session used to create them
is deleted, is idle for too long, begins a new transaction, or becomes too
old. When any of these happen, it isn't possible to resume the read, and
the whole operation must be restarted from the beginning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::PartitionReadRequest request = new gcsv::PartitionReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        PartitionOptions = new gcsv::PartitionOptions(),
    };
    // Make the request
    gcsv::PartitionResponse response = await spannerClient.PartitionReadAsync(request);

### Read(ReadRequest, CallSettings)

    public virtual ResultSet Read(ReadRequest request, CallSettings callSettings = null)

Reads rows from the database using key lookups and scans, as a
simple key/value style alternative to
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\]. This method can't be
used to return a result set larger than 10 MiB; if the read matches more
data than that, the read fails with a `FAILED_PRECONDITION`
error.

Reads inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be yielded in streaming fashion by calling
\[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ReadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | The RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ReadRequest request = new gcsv::ReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        Limit = 0L,
        ResumeToken = ByteString.Empty,
        PartitionToken = ByteString.Empty,
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        OrderBy = gcsv::ReadRequest.Types.OrderBy.Unspecified,
        LockHint = gcsv::ReadRequest.Types.LockHint.Unspecified,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = spannerClient.Read(request);

### ReadAsync(ReadRequest, CallSettings)

    public virtual Task<ResultSet> ReadAsync(ReadRequest request, CallSettings callSettings = null)

Reads rows from the database using key lookups and scans, as a
simple key/value style alternative to
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\]. This method can't be
used to return a result set larger than 10 MiB; if the read matches more
data than that, the read fails with a `FAILED_PRECONDITION`
error.

Reads inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be yielded in streaming fashion by calling
\[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ReadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ReadRequest request = new gcsv::ReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        Limit = 0L,
        ResumeToken = ByteString.Empty,
        PartitionToken = ByteString.Empty,
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        OrderBy = gcsv::ReadRequest.Types.OrderBy.Unspecified,
        LockHint = gcsv::ReadRequest.Types.LockHint.Unspecified,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = await spannerClient.ReadAsync(request);

### ReadAsync(ReadRequest, CancellationToken)

    public virtual Task<ResultSet> ReadAsync(ReadRequest request, CancellationToken cancellationToken)

Reads rows from the database using key lookups and scans, as a
simple key/value style alternative to
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\]. This method can't be
used to return a result set larger than 10 MiB; if the read matches more
data than that, the read fails with a `FAILED_PRECONDITION`
error.

Reads inside read-write transactions might return `ABORTED`. If
this occurs, the application should restart the transaction from
the beginning. See \[Transaction\]\[google.spanner.v1.Transaction\] for more
details.

Larger result sets can be yielded in streaming fashion by calling
\[StreamingRead\]\[google.spanner.v1.Spanner.StreamingRead\] instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ReadRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ResultSet` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::ReadRequest request = new gcsv::ReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        Limit = 0L,
        ResumeToken = ByteString.Empty,
        PartitionToken = ByteString.Empty,
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        OrderBy = gcsv::ReadRequest.Types.OrderBy.Unspecified,
        LockHint = gcsv::ReadRequest.Types.LockHint.Unspecified,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request
    gcsv::ResultSet response = await spannerClient.ReadAsync(request);

### Rollback(RollbackRequest, CallSettings)

    public virtual void Rollback(RollbackRequest request, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.RollbackRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::RollbackRequest request = new gcsv::RollbackRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
    };
    // Make the request
    spannerClient.Rollback(request);

### Rollback(SessionName, ByteString, CallSettings)

    public virtual void Rollback(SessionName session, ByteString transactionId, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    // Make the request
    spannerClient.Rollback(session, transactionId);

### Rollback(string, ByteString, CallSettings)

    public virtual void Rollback(string session, ByteString transactionId, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    // Make the request
    spannerClient.Rollback(session, transactionId);

### RollbackAsync(RollbackRequest, CallSettings)

    public virtual Task RollbackAsync(RollbackRequest request, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.RollbackRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::RollbackRequest request = new gcsv::RollbackRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
    };
    // Make the request
    await spannerClient.RollbackAsync(request);

### RollbackAsync(RollbackRequest, CancellationToken)

    public virtual Task RollbackAsync(RollbackRequest request, CancellationToken cancellationToken)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.RollbackRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::RollbackRequest request = new gcsv::RollbackRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        TransactionId = ByteString.Empty,
    };
    // Make the request
    await spannerClient.RollbackAsync(request);

### RollbackAsync(SessionName, ByteString, CallSettings)

    public virtual Task RollbackAsync(SessionName session, ByteString transactionId, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    // Make the request
    await spannerClient.RollbackAsync(session, transactionId);

### RollbackAsync(SessionName, ByteString, CancellationToken)

    public virtual Task RollbackAsync(SessionName session, ByteString transactionId, CancellationToken cancellationToken)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
    ByteString transactionId = ByteString.Empty;
    // Make the request
    await spannerClient.RollbackAsync(session, transactionId);

### RollbackAsync(string, ByteString, CallSettings)

    public virtual Task RollbackAsync(string session, ByteString transactionId, CallSettings callSettings = null)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    // Make the request
    await spannerClient.RollbackAsync(session, transactionId);

### RollbackAsync(string, ByteString, CancellationToken)

    public virtual Task RollbackAsync(string session, ByteString transactionId, CancellationToken cancellationToken)

Rolls back a transaction, releasing any locks it holds. It's a good
idea to call this for any transaction that includes one or more
\[Read\]\[google.spanner.v1.Spanner.Read\] or
\[ExecuteSql\]\[google.spanner.v1.Spanner.ExecuteSql\] requests and ultimately
decides not to commit.

`Rollback` returns `OK` if it successfully aborts the transaction, the
transaction was already aborted, or the transaction isn't
found. `Rollback` never returns `ABORTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The session in which the transaction to roll back is running. |
| `transactionId` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The transaction to roll back. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync();
    // Initialize request argument(s)
    string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]";
    ByteString transactionId = ByteString.Empty;
    // Make the request
    await spannerClient.RollbackAsync(session, transactionId);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient#Google_Cloud_Spanner_V1_SpannerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient#Google_Cloud_Spanner_V1_SpannerClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient#Google_Cloud_Spanner_V1_SpannerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient#Google_Cloud_Spanner_V1_SpannerClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### StreamingRead(ReadRequest, CallSettings)

    public virtual SpannerClient.StreamingReadStream StreamingRead(ReadRequest request, CallSettings callSettings = null)

Like \[Read\]\[google.spanner.v1.Spanner.Read\], except returns the result set
as a stream. Unlike \[Read\]\[google.spanner.v1.Spanner.Read\], there is no
limit on the size of the returned result set. However, no individual row in
the result set can exceed 100 MiB, and no column value can exceed
10 MiB.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ReadRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClienthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerClient.StreamingReadStream` | The server stream. |

**Example**

    // Create client
    gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create();
    // Initialize request argument(s)
    gcsv::ReadRequest request = new gcsv::ReadRequest
    {
        SessionAsSessionName = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"),
        Transaction = new gcsv::TransactionSelector(),
        Table = "",
        Index = "",
        Columns = { "", },
        KeySet = new gcsv::KeySet(),
        Limit = 0L,
        ResumeToken = ByteString.Empty,
        PartitionToken = ByteString.Empty,
        RequestOptions = new gcsv::RequestOptions(),
        DirectedReadOptions = new gcsv::DirectedReadOptions(),
        DataBoostEnabled = false,
        OrderBy = gcsv::ReadRequest.Types.OrderBy.Unspecified,
        LockHint = gcsv::ReadRequest.Types.LockHint.Unspecified,
        RoutingHint = new gcsv::RoutingHint(),
    };
    // Make the request, returning a streaming response
    using gcsv::SpannerClient.StreamingReadStream response = spannerClient.StreamingRead(request);

    // Read streaming responses from server until complete
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<gcsv::PartialResultSet> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        gcsv::PartialResultSet responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed