From 44600f7923cfb6cc9e2464a4f95ef559dbc7c1b6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 29 Apr 2024 17:23:23 +0000 Subject: [PATCH] feat: add `RESOURCE_EXHAUSTED` to the list of retryable error codes PiperOrigin-RevId: 628281023 Source-Link: https://github.com/googleapis/googleapis/commit/60536a2a263b6d33b0b1adb5b10c10e34ccf4528 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c5cfd5b956f9eadff54096c9f1c8a57ab01db294 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU3Bhbm5lci5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYzVjZmQ1Yjk1NmY5ZWFkZmY1NDA5NmM5ZjFjOGE1N2FiMDFkYjI5NCJ9 --- ....Cloud.Spanner.V1.GeneratedSnippets.csproj | 15 + ...lient.BatchCreateSessionsAsyncSnippet.g.cs | 45 + ...eateSessionsRequestObjectAsyncSnippet.g.cs | 49 + ...tchCreateSessionsRequestObjectSnippet.g.cs | 48 + ...eateSessionsResourceNamesAsyncSnippet.g.cs | 45 + ...tchCreateSessionsResourceNamesSnippet.g.cs | 44 + ...nnerClient.BatchCreateSessionsSnippet.g.cs | 44 + ...Client.BatchWriteRequestObjectSnippet.g.cs | 64 + ...Client.BatchWriteResourceNamesSnippet.g.cs | 60 + .../SpannerClient.BatchWriteSnippet.g.cs | 60 + ...erClient.BeginTransactionAsyncSnippet.g.cs | 45 + ...nTransactionRequestObjectAsyncSnippet.g.cs | 49 + ....BeginTransactionRequestObjectSnippet.g.cs | 48 + ...nTransactionResourceNamesAsyncSnippet.g.cs | 45 + ....BeginTransactionResourceNamesSnippet.g.cs | 44 + ...SpannerClient.BeginTransactionSnippet.g.cs | 44 + .../SpannerClient.Commit1AsyncSnippet.g.cs | 48 + ...ient.Commit1ResourceNamesAsyncSnippet.g.cs | 48 + ...nerClient.Commit1ResourceNamesSnippet.g.cs | 47 + .../SpannerClient.Commit1Snippet.g.cs | 47 + .../SpannerClient.Commit2AsyncSnippet.g.cs | 47 + ...ient.Commit2ResourceNamesAsyncSnippet.g.cs | 47 + ...nerClient.Commit2ResourceNamesSnippet.g.cs | 46 + .../SpannerClient.Commit2Snippet.g.cs | 46 + ...lient.CommitRequestObjectAsyncSnippet.g.cs | 54 + ...nnerClient.CommitRequestObjectSnippet.g.cs | 53 + ...annerClient.CreateSessionAsyncSnippet.g.cs | 44 + ...reateSessionRequestObjectAsyncSnippet.g.cs | 48 + ...ent.CreateSessionRequestObjectSnippet.g.cs | 47 + ...reateSessionResourceNamesAsyncSnippet.g.cs | 44 + ...ent.CreateSessionResourceNamesSnippet.g.cs | 43 + .../SpannerClient.CreateSessionSnippet.g.cs | 43 + ...annerClient.DeleteSessionAsyncSnippet.g.cs | 44 + ...eleteSessionRequestObjectAsyncSnippet.g.cs | 47 + ...ent.DeleteSessionRequestObjectSnippet.g.cs | 46 + ...eleteSessionResourceNamesAsyncSnippet.g.cs | 44 + ...ent.DeleteSessionResourceNamesSnippet.g.cs | 43 + .../SpannerClient.DeleteSessionSnippet.g.cs | 43 + ...cuteBatchDmlRequestObjectAsyncSnippet.g.cs | 54 + ...t.ExecuteBatchDmlRequestObjectSnippet.g.cs | 53 + ...t.ExecuteSqlRequestObjectAsyncSnippet.g.cs | 69 + ...Client.ExecuteSqlRequestObjectSnippet.g.cs | 68 + ...ecuteStreamingSqlRequestObjectSnippet.g.cs | 80 + .../SpannerClient.GetSessionAsyncSnippet.g.cs | 44 + ...t.GetSessionRequestObjectAsyncSnippet.g.cs | 47 + ...Client.GetSessionRequestObjectSnippet.g.cs | 46 + ...t.GetSessionResourceNamesAsyncSnippet.g.cs | 44 + ...Client.GetSessionResourceNamesSnippet.g.cs | 43 + .../SpannerClient.GetSessionSnippet.g.cs | 43 + ...pannerClient.ListSessionsAsyncSnippet.g.cs | 79 + ...ListSessionsRequestObjectAsyncSnippet.g.cs | 83 + ...ient.ListSessionsRequestObjectSnippet.g.cs | 81 + ...ListSessionsResourceNamesAsyncSnippet.g.cs | 79 + ...ient.ListSessionsResourceNamesSnippet.g.cs | 77 + .../SpannerClient.ListSessionsSnippet.g.cs | 77 + ...rtitionQueryRequestObjectAsyncSnippet.g.cs | 61 + ...nt.PartitionQueryRequestObjectSnippet.g.cs | 60 + ...artitionReadRequestObjectAsyncSnippet.g.cs | 53 + ...ent.PartitionReadRequestObjectSnippet.g.cs | 52 + ...rClient.ReadRequestObjectAsyncSnippet.g.cs | 59 + ...pannerClient.ReadRequestObjectSnippet.g.cs | 58 + .../SpannerClient.RollbackAsyncSnippet.g.cs | 46 + ...ent.RollbackRequestObjectAsyncSnippet.g.cs | 49 + ...erClient.RollbackRequestObjectSnippet.g.cs | 48 + ...ent.RollbackResourceNamesAsyncSnippet.g.cs | 46 + ...erClient.RollbackResourceNamesSnippet.g.cs | 45 + .../SpannerClient.RollbackSnippet.g.cs | 45 + ...ent.StreamingReadRequestObjectSnippet.g.cs | 70 + .../snippet_metadata_google.spanner.v1.json | 3369 ++++++ .../Google.Cloud.Spanner.V1.Snippets.csproj | 15 + .../SpannerClientSnippets.g.cs | 1493 +++ .../CommitResponse.g.cs | 518 + .../Google.Cloud.Spanner.V1.csproj | 47 + .../Google.Cloud.Spanner.V1/Keys.g.cs | 847 ++ .../Google.Cloud.Spanner.V1/Mutation.g.cs | 1066 ++ .../PackageApiMetadata.g.cs | 43 + .../Google.Cloud.Spanner.V1/QueryPlan.g.cs | 1267 +++ .../Google.Cloud.Spanner.V1/ResultSet.g.cs | 1539 +++ .../ServiceCollectionExtensions.g.cs | 61 + .../Google.Cloud.Spanner.V1/Spanner.g.cs | 9905 +++++++++++++++++ .../SpannerClient.g.cs | 3520 ++++++ .../Google.Cloud.Spanner.V1/SpannerGrpc.g.cs | 1853 +++ .../SpannerResourceNames.g.cs | 713 ++ .../Google.Cloud.Spanner.V1/Transaction.g.cs | 2378 ++++ .../Google.Cloud.Spanner.V1/Type.g.cs | 1041 ++ .../gapic_metadata.json | 114 + 86 files changed, 33316 insertions(+) create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/Google.Cloud.Spanner.V1.GeneratedSnippets.csproj create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1AsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1Snippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2AsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2Snippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteStreamingSqlRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.StreamingReadRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/snippet_metadata_google.spanner.v1.json create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/Google.Cloud.Spanner.V1.Snippets.csproj create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/SpannerClientSnippets.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/CommitResponse.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.csproj create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Keys.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Mutation.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/PackageApiMetadata.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/QueryPlan.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ResultSet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ServiceCollectionExtensions.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Spanner.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerClient.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerGrpc.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerResourceNames.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Transaction.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Type.g.cs create mode 100755 owl-bot-staging/Google.Cloud.Spanner.V1/gapic_metadata.json diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/Google.Cloud.Spanner.V1.GeneratedSnippets.csproj b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/Google.Cloud.Spanner.V1.GeneratedSnippets.csproj new file mode 100755 index 000000000000..577720da31a5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/Google.Cloud.Spanner.V1.GeneratedSnippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsAsyncSnippet.g.cs new file mode 100755 index 000000000000..f8a1b360f6ef --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsAsyncSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchCreateSessionsAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + int sessionCount = 0; + // Make the request + BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..baed28649546 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchCreateSessionsRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + BatchCreateSessionsRequest request = new BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + SessionTemplate = new Session(), + SessionCount = 0, + }; + // Make the request + BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(request); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..163d4e7598f9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BatchCreateSessionsRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + BatchCreateSessionsRequest request = new BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + SessionTemplate = new Session(), + SessionCount = 0, + }; + // Make the request + BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(request); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..14e42283d300 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchCreateSessionsResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + int sessionCount = 0; + // Make the request + BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..1fc1fb8206b5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsResourceNamesSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BatchCreateSessionsResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + int sessionCount = 0; + // Make the request + BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(database, sessionCount); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsSnippet.g.cs new file mode 100755 index 000000000000..eda74313b267 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchCreateSessionsSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchCreateSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BatchCreateSessions() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + int sessionCount = 0; + // Make the request + BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(database, sessionCount); + } + } + // [END spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..0c2f16211357 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteRequestObjectSnippet.g.cs @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchWrite_sync] + using Google.Api.Gax.Grpc; + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchWrite + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchWriteRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + BatchWriteRequest request = new BatchWriteRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + RequestOptions = new RequestOptions(), + MutationGroups = + { + new BatchWriteRequest.Types.MutationGroup(), + }, + ExcludeTxnFromChangeStreams = false, + }; + // Make the request, returning a streaming response + using SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(request); + + // Read streaming responses from server until complete + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + } + } + // [END spanner_v1_generated_Spanner_BatchWrite_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..9a00c81249ce --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteResourceNamesSnippet.g.cs @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchWrite_sync_flattened_resourceNames] + using Google.Api.Gax.Grpc; + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchWrite + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchWriteResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + IEnumerable mutationGroups = new BatchWriteRequest.Types.MutationGroup[] + { + new BatchWriteRequest.Types.MutationGroup(), + }; + // Make the request, returning a streaming response + using SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(session, mutationGroups); + + // Read streaming responses from server until complete + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + } + } + // [END spanner_v1_generated_Spanner_BatchWrite_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteSnippet.g.cs new file mode 100755 index 000000000000..5a518c8bf5f6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BatchWriteSnippet.g.cs @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BatchWrite_sync_flattened] + using Google.Api.Gax.Grpc; + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BatchWrite + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BatchWrite() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + IEnumerable mutationGroups = new BatchWriteRequest.Types.MutationGroup[] + { + new BatchWriteRequest.Types.MutationGroup(), + }; + // Make the request, returning a streaming response + using SpannerClient.BatchWriteStream response = spannerClient.BatchWrite(session, mutationGroups); + + // Read streaming responses from server until complete + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + } + } + // [END spanner_v1_generated_Spanner_BatchWrite_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionAsyncSnippet.g.cs new file mode 100755 index 000000000000..470b1776a20f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionAsyncSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_async_flattened] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransactionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BeginTransactionAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + TransactionOptions options = new TransactionOptions(); + // Make the request + Transaction response = await spannerClient.BeginTransactionAsync(session, options); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..fcf8ccc06a07 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransactionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BeginTransactionRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + BeginTransactionRequest request = new BeginTransactionRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Options = new TransactionOptions(), + RequestOptions = new RequestOptions(), + }; + // Make the request + Transaction response = await spannerClient.BeginTransactionAsync(request); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..42db1192ced7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransaction + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BeginTransactionRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + BeginTransactionRequest request = new BeginTransactionRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Options = new TransactionOptions(), + RequestOptions = new RequestOptions(), + }; + // Make the request + Transaction response = spannerClient.BeginTransaction(request); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..6469f5db56d7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransactionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task BeginTransactionResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + TransactionOptions options = new TransactionOptions(); + // Make the request + Transaction response = await spannerClient.BeginTransactionAsync(session, options); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..998872a81ee6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionResourceNamesSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransaction + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BeginTransactionResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + TransactionOptions options = new TransactionOptions(); + // Make the request + Transaction response = spannerClient.BeginTransaction(session, options); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionSnippet.g.cs new file mode 100755 index 000000000000..c9308e7ffdf9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.BeginTransactionSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_BeginTransaction_sync_flattened] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for BeginTransaction + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void BeginTransaction() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + TransactionOptions options = new TransactionOptions(); + // Make the request + Transaction response = spannerClient.BeginTransaction(session, options); + } + } + // [END spanner_v1_generated_Spanner_BeginTransaction_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1AsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1AsyncSnippet.g.cs new file mode 100755 index 000000000000..ff4f64eefa02 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1AsyncSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_async_flattened1] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CommitAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task Commit1Async() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + ByteString transactionId = ByteString.Empty; + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_async_flattened1] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..bfa37d5308cd --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_async_flattened1_resourceNames] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CommitAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task Commit1ResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + ByteString transactionId = ByteString.Empty; + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_async_flattened1_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..ae985411a99b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1ResourceNamesSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_sync_flattened1_resourceNames] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Collections.Generic; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Commit + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void Commit1ResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + ByteString transactionId = ByteString.Empty; + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = spannerClient.Commit(session, transactionId, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_sync_flattened1_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1Snippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1Snippet.g.cs new file mode 100755 index 000000000000..4f22735345b9 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit1Snippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_sync_flattened1] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Collections.Generic; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Commit + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void Commit1() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + ByteString transactionId = ByteString.Empty; + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = spannerClient.Commit(session, transactionId, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_sync_flattened1] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2AsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2AsyncSnippet.g.cs new file mode 100755 index 000000000000..59d8ca4703ca --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2AsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_async_flattened2] + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CommitAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task Commit2Async() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + TransactionOptions singleUseTransaction = new TransactionOptions(); + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_async_flattened2] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..e5c1221af655 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_async_flattened2_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CommitAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task Commit2ResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + TransactionOptions singleUseTransaction = new TransactionOptions(); + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_async_flattened2_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..9bffce38a4ff --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2ResourceNamesSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_sync_flattened2_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Commit + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void Commit2ResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + TransactionOptions singleUseTransaction = new TransactionOptions(); + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_sync_flattened2_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2Snippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2Snippet.g.cs new file mode 100755 index 000000000000..52b0c6cdabf0 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.Commit2Snippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_sync_flattened2] + using Google.Cloud.Spanner.V1; + using System.Collections.Generic; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Commit + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void Commit2() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + TransactionOptions singleUseTransaction = new TransactionOptions(); + IEnumerable mutations = new Mutation[] { new Mutation(), }; + // Make the request + CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations); + } + } + // [END spanner_v1_generated_Spanner_Commit_sync_flattened2] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..6692ae171e87 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,54 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_async] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CommitAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CommitRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + CommitRequest request = new CommitRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + TransactionId = ByteString.Empty, + Mutations = { new Mutation(), }, + ReturnCommitStats = false, + RequestOptions = new RequestOptions(), + MaxCommitDelay = new Duration(), + }; + // Make the request + CommitResponse response = await spannerClient.CommitAsync(request); + } + } + // [END spanner_v1_generated_Spanner_Commit_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..eae7f7e0892e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CommitRequestObjectSnippet.g.cs @@ -0,0 +1,53 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Commit_sync] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Commit + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CommitRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + CommitRequest request = new CommitRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + TransactionId = ByteString.Empty, + Mutations = { new Mutation(), }, + ReturnCommitStats = false, + RequestOptions = new RequestOptions(), + MaxCommitDelay = new Duration(), + }; + // Make the request + CommitResponse response = spannerClient.Commit(request); + } + } + // [END spanner_v1_generated_Spanner_Commit_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionAsyncSnippet.g.cs new file mode 100755 index 000000000000..a1442ea9e93b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_async_flattened] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateSessionAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + // Make the request + Session response = await spannerClient.CreateSessionAsync(database); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..bf06a51efdf5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateSessionRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + CreateSessionRequest request = new CreateSessionRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Session = new Session(), + }; + // Make the request + Session response = await spannerClient.CreateSessionAsync(request); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..6ffc665fd3d4 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionRequestObjectSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateSessionRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + CreateSessionRequest request = new CreateSessionRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Session = new Session(), + }; + // Make the request + Session response = spannerClient.CreateSession(request); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..a3256bede14c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateSessionResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + Session response = await spannerClient.CreateSessionAsync(database); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..b1a677128ffd --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateSessionResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + Session response = spannerClient.CreateSession(database); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionSnippet.g.cs new file mode 100755 index 000000000000..651237959930 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.CreateSessionSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_CreateSession_sync_flattened] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for CreateSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateSession() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + // Make the request + Session response = spannerClient.CreateSession(database); + } + } + // [END spanner_v1_generated_Spanner_CreateSession_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionAsyncSnippet.g.cs new file mode 100755 index 000000000000..f6fbd9ec1c59 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_async_flattened] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteSessionAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + // Make the request + await spannerClient.DeleteSessionAsync(name); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..e8d8f3af4f3c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteSessionRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + DeleteSessionRequest request = new DeleteSessionRequest + { + SessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + }; + // Make the request + await spannerClient.DeleteSessionAsync(request); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..7fb438ef3e17 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteSessionRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + DeleteSessionRequest request = new DeleteSessionRequest + { + SessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + }; + // Make the request + spannerClient.DeleteSession(request); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..b4fdc904da79 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteSessionResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName name = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + // Make the request + await spannerClient.DeleteSessionAsync(name); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..13af94cd6c0f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteSessionResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName name = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + // Make the request + spannerClient.DeleteSession(name); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionSnippet.g.cs new file mode 100755 index 000000000000..a583fe56d81c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.DeleteSessionSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_DeleteSession_sync_flattened] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for DeleteSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteSession() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + // Make the request + spannerClient.DeleteSession(name); + } + } + // [END spanner_v1_generated_Spanner_DeleteSession_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..e39d11e3536e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,54 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ExecuteBatchDml_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ExecuteBatchDmlAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ExecuteBatchDmlRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + ExecuteBatchDmlRequest request = new ExecuteBatchDmlRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Statements = + { + new ExecuteBatchDmlRequest.Types.Statement(), + }, + Seqno = 0L, + RequestOptions = new RequestOptions(), + }; + // Make the request + ExecuteBatchDmlResponse response = await spannerClient.ExecuteBatchDmlAsync(request); + } + } + // [END spanner_v1_generated_Spanner_ExecuteBatchDml_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..6d2e5bb21456 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteBatchDmlRequestObjectSnippet.g.cs @@ -0,0 +1,53 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ExecuteBatchDml_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ExecuteBatchDml + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ExecuteBatchDmlRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + ExecuteBatchDmlRequest request = new ExecuteBatchDmlRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Statements = + { + new ExecuteBatchDmlRequest.Types.Statement(), + }, + Seqno = 0L, + RequestOptions = new RequestOptions(), + }; + // Make the request + ExecuteBatchDmlResponse response = spannerClient.ExecuteBatchDml(request); + } + } + // [END spanner_v1_generated_Spanner_ExecuteBatchDml_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..8809c76e3219 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ExecuteSql_async] + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcsv = Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ExecuteSqlAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ExecuteSqlRequestObjectAsync() + { + // 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, + }; + // Make the request + gcsv::ResultSet response = await spannerClient.ExecuteSqlAsync(request); + } + } + // [END spanner_v1_generated_Spanner_ExecuteSql_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..48d46775a0ed --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteSqlRequestObjectSnippet.g.cs @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ExecuteSql_sync] + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + using gcsv = Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ExecuteSql + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ExecuteSqlRequestObject() + { + // 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, + }; + // Make the request + gcsv::ResultSet response = spannerClient.ExecuteSql(request); + } + } + // [END spanner_v1_generated_Spanner_ExecuteSql_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteStreamingSqlRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteStreamingSqlRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..b69f66d230f8 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ExecuteStreamingSqlRequestObjectSnippet.g.cs @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] + using Google.Api.Gax.Grpc; + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcsv = Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ExecuteStreamingSql + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ExecuteStreamingSqlRequestObject() + { + // 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, + }; + // 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::PartialResultSet responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + } + } + // [END spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionAsyncSnippet.g.cs new file mode 100755 index 000000000000..779a1a74e988 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_async_flattened] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetSessionAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + // Make the request + Session response = await spannerClient.GetSessionAsync(name); + } + } + // [END spanner_v1_generated_Spanner_GetSession_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..333dcb27c772 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetSessionRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + GetSessionRequest request = new GetSessionRequest + { + SessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + }; + // Make the request + Session response = await spannerClient.GetSessionAsync(request); + } + } + // [END spanner_v1_generated_Spanner_GetSession_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..37bb7183812c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetSessionRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + GetSessionRequest request = new GetSessionRequest + { + SessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + }; + // Make the request + Session response = spannerClient.GetSession(request); + } + } + // [END spanner_v1_generated_Spanner_GetSession_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..f3249d000af3 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSessionAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetSessionResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName name = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + // Make the request + Session response = await spannerClient.GetSessionAsync(name); + } + } + // [END spanner_v1_generated_Spanner_GetSession_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..7cd2d8ad27ec --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetSessionResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName name = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + // Make the request + Session response = spannerClient.GetSession(name); + } + } + // [END spanner_v1_generated_Spanner_GetSession_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionSnippet.g.cs new file mode 100755 index 000000000000..8699b741a40b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.GetSessionSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_GetSession_sync_flattened] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for GetSession + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetSession() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + // Make the request + Session response = spannerClient.GetSession(name); + } + } + // [END spanner_v1_generated_Spanner_GetSession_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsAsyncSnippet.g.cs new file mode 100755 index 000000000000..6456f2608a15 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_async_flattened] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListSessionsAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + // Make the request + PagedAsyncEnumerable response = spannerClient.ListSessionsAsync(database); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListSessionsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..2acca1081077 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_async] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListSessionsRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + ListSessionsRequest request = new ListSessionsRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Filter = "", + }; + // Make the request + PagedAsyncEnumerable response = spannerClient.ListSessionsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListSessionsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..7f10a170fe4c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsRequestObjectSnippet.g.cs @@ -0,0 +1,81 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_sync] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListSessionsRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + ListSessionsRequest request = new ListSessionsRequest + { + DatabaseAsDatabaseName = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Filter = "", + }; + // Make the request + PagedEnumerable response = spannerClient.ListSessions(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (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 (ListSessionsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..c4031f3009ca --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessionsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListSessionsResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + PagedAsyncEnumerable response = spannerClient.ListSessionsAsync(database); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListSessionsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..fae023130633 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsResourceNamesSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListSessionsResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + DatabaseName database = DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + PagedEnumerable response = spannerClient.ListSessions(database); + + // Iterate over all response items, lazily performing RPCs as required + foreach (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 (ListSessionsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsSnippet.g.cs new file mode 100755 index 000000000000..c86b0a9053ca --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ListSessionsSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_ListSessions_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Spanner.V1; + using System; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ListSessions + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListSessions() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + // Make the request + PagedEnumerable response = spannerClient.ListSessions(database); + + // Iterate over all response items, lazily performing RPCs as required + foreach (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 (ListSessionsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (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 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 (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; + } + } + // [END spanner_v1_generated_Spanner_ListSessions_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..e078dac99af7 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_PartitionQuery_async] + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + using gcsv = Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for PartitionQueryAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task PartitionQueryRequestObjectAsync() + { + // 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); + } + } + // [END spanner_v1_generated_Spanner_PartitionQuery_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..bfca3c179141 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionQueryRequestObjectSnippet.g.cs @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_PartitionQuery_sync] + using Google.Protobuf.WellKnownTypes; + using gcsv = Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for PartitionQuery + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void PartitionQueryRequestObject() + { + // 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); + } + } + // [END spanner_v1_generated_Spanner_PartitionQuery_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..a4f92ca4274c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,53 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_PartitionRead_async] + using Google.Cloud.Spanner.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for PartitionReadAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task PartitionReadRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + PartitionReadRequest request = new PartitionReadRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Table = "", + Index = "", + Columns = { "", }, + KeySet = new KeySet(), + PartitionOptions = new PartitionOptions(), + }; + // Make the request + PartitionResponse response = await spannerClient.PartitionReadAsync(request); + } + } + // [END spanner_v1_generated_Spanner_PartitionRead_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..9391a1d0f469 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.PartitionReadRequestObjectSnippet.g.cs @@ -0,0 +1,52 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_PartitionRead_sync] + using Google.Cloud.Spanner.V1; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for PartitionRead + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void PartitionReadRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + PartitionReadRequest request = new PartitionReadRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Table = "", + Index = "", + Columns = { "", }, + KeySet = new KeySet(), + PartitionOptions = new PartitionOptions(), + }; + // Make the request + PartitionResponse response = spannerClient.PartitionRead(request); + } + } + // [END spanner_v1_generated_Spanner_PartitionRead_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..ad2b8abe961d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,59 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Read_async] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for ReadAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ReadRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + ReadRequest request = new ReadRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Table = "", + Index = "", + Columns = { "", }, + KeySet = new KeySet(), + Limit = 0L, + ResumeToken = ByteString.Empty, + PartitionToken = ByteString.Empty, + RequestOptions = new RequestOptions(), + DirectedReadOptions = new DirectedReadOptions(), + DataBoostEnabled = false, + }; + // Make the request + ResultSet response = await spannerClient.ReadAsync(request); + } + } + // [END spanner_v1_generated_Spanner_Read_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..2fcb76353aa8 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.ReadRequestObjectSnippet.g.cs @@ -0,0 +1,58 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Read_sync] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Read + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ReadRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + ReadRequest request = new ReadRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Table = "", + Index = "", + Columns = { "", }, + KeySet = new KeySet(), + Limit = 0L, + ResumeToken = ByteString.Empty, + PartitionToken = ByteString.Empty, + RequestOptions = new RequestOptions(), + DirectedReadOptions = new DirectedReadOptions(), + DataBoostEnabled = false, + }; + // Make the request + ResultSet response = spannerClient.Read(request); + } + } + // [END spanner_v1_generated_Spanner_Read_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackAsyncSnippet.g.cs new file mode 100755 index 000000000000..54c8b77ec692 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_async_flattened] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for RollbackAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task RollbackAsync() + { + // Create client + SpannerClient spannerClient = await 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); + } + } + // [END spanner_v1_generated_Spanner_Rollback_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..610f477069f0 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_async] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for RollbackAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task RollbackRequestObjectAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + RollbackRequest request = new RollbackRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + TransactionId = ByteString.Empty, + }; + // Make the request + await spannerClient.RollbackAsync(request); + } + } + // [END spanner_v1_generated_Spanner_Rollback_async] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..f7f51fe5c09e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_sync] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Rollback + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void RollbackRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + RollbackRequest request = new RollbackRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + TransactionId = ByteString.Empty, + }; + // Make the request + spannerClient.Rollback(request); + } + } + // [END spanner_v1_generated_Spanner_Rollback_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesAsyncSnippet.g.cs new file mode 100755 index 000000000000..6454e842437a --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_async_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for RollbackAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task RollbackResourceNamesAsync() + { + // Create client + SpannerClient spannerClient = await SpannerClient.CreateAsync(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + ByteString transactionId = ByteString.Empty; + // Make the request + await spannerClient.RollbackAsync(session, transactionId); + } + } + // [END spanner_v1_generated_Spanner_Rollback_async_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesSnippet.g.cs new file mode 100755 index 000000000000..68af7e196967 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackResourceNamesSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_sync_flattened_resourceNames] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Rollback + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void RollbackResourceNames() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + SessionName session = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + ByteString transactionId = ByteString.Empty; + // Make the request + spannerClient.Rollback(session, transactionId); + } + } + // [END spanner_v1_generated_Spanner_Rollback_sync_flattened_resourceNames] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackSnippet.g.cs new file mode 100755 index 000000000000..667ea75a078e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.RollbackSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_Rollback_sync_flattened] + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for Rollback + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void Rollback() + { + // Create client + SpannerClient spannerClient = 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); + } + } + // [END spanner_v1_generated_Spanner_Rollback_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.StreamingReadRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.StreamingReadRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..9749d8086f21 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/SpannerClient.StreamingReadRequestObjectSnippet.g.cs @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START spanner_v1_generated_Spanner_StreamingRead_sync] + using Google.Api.Gax.Grpc; + using Google.Cloud.Spanner.V1; + using Google.Protobuf; + using System.Threading.Tasks; + + public sealed partial class GeneratedSpannerClientSnippets + { + /// Snippet for StreamingRead + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task StreamingReadRequestObject() + { + // Create client + SpannerClient spannerClient = SpannerClient.Create(); + // Initialize request argument(s) + ReadRequest request = new ReadRequest + { + SessionAsSessionName = SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"), + Transaction = new TransactionSelector(), + Table = "", + Index = "", + Columns = { "", }, + KeySet = new KeySet(), + Limit = 0L, + ResumeToken = ByteString.Empty, + PartitionToken = ByteString.Empty, + RequestOptions = new RequestOptions(), + DirectedReadOptions = new DirectedReadOptions(), + DataBoostEnabled = false, + }; + // Make the request, returning a streaming response + using SpannerClient.StreamingReadStream response = spannerClient.StreamingRead(request); + + // Read streaming responses from server until complete + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + PartialResultSet responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + } + } + // [END spanner_v1_generated_Spanner_StreamingRead_sync] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/snippet_metadata_google.spanner.v1.json b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/snippet_metadata_google.spanner.v1.json new file mode 100755 index 000000000000..8e21f54af662 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.GeneratedSnippets/snippet_metadata_google.spanner.v1.json @@ -0,0 +1,3369 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.Spanner.V1", + "language": "C_SHARP", + "apis": [ + { + "id": "google.spanner.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_sync", + "title": "CreateSessionRequestObject", + "description": "Snippet for CreateSession", + "file": "SpannerClient.CreateSessionRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.CreateSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 34, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_async", + "title": "CreateSessionRequestObjectAsync", + "description": "Snippet for CreateSessionAsync", + "file": "SpannerClient.CreateSessionRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.CreateSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_sync_flattened", + "title": "CreateSession", + "description": "Snippet for CreateSession", + "file": "SpannerClient.CreateSessionSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSession", + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_async_flattened", + "title": "CreateSessionAsync", + "description": "Snippet for CreateSessionAsync", + "file": "SpannerClient.CreateSessionAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSessionAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_sync_flattened_resourceNames", + "title": "CreateSessionResourceNames", + "description": "Snippet for CreateSession", + "file": "SpannerClient.CreateSessionResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_CreateSession_async_flattened_resourceNames", + "title": "CreateSessionResourceNamesAsync", + "description": "Snippet for CreateSessionAsync", + "file": "SpannerClient.CreateSessionResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CreateSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "CreateSession", + "fullName": "google.spanner.v1.Spanner.CreateSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_sync", + "title": "BatchCreateSessionsRequestObject", + "description": "Snippet for BatchCreateSessions", + "file": "SpannerClient.BatchCreateSessionsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessions", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.BatchCreateSessionsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.BatchCreateSessionsResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 34, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_async", + "title": "BatchCreateSessionsRequestObjectAsync", + "description": "Snippet for BatchCreateSessionsAsync", + "file": "SpannerClient.BatchCreateSessionsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessionsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.BatchCreateSessionsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 35, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened", + "title": "BatchCreateSessions", + "description": "Snippet for BatchCreateSessions", + "file": "SpannerClient.BatchCreateSessionsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessions", + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "System.Int32", + "name": "sessionCount" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.BatchCreateSessionsResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 34, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened", + "title": "BatchCreateSessionsAsync", + "description": "Snippet for BatchCreateSessionsAsync", + "file": "SpannerClient.BatchCreateSessionsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessionsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "System.Int32", + "name": "sessionCount" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_sync_flattened_resourceNames", + "title": "BatchCreateSessionsResourceNames", + "description": "Snippet for BatchCreateSessions", + "file": "SpannerClient.BatchCreateSessionsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessions", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "System.Int32", + "name": "sessionCount" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.BatchCreateSessionsResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 34, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchCreateSessions_async_flattened_resourceNames", + "title": "BatchCreateSessionsResourceNamesAsync", + "description": "Snippet for BatchCreateSessionsAsync", + "file": "SpannerClient.BatchCreateSessionsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchCreateSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchCreateSessionsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "System.Int32", + "name": "sessionCount" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchCreateSessions", + "fullName": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_sync", + "title": "GetSessionRequestObject", + "description": "Snippet for GetSession", + "file": "SpannerClient.GetSessionRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.GetSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_async", + "title": "GetSessionRequestObjectAsync", + "description": "Snippet for GetSessionAsync", + "file": "SpannerClient.GetSessionRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.GetSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_sync_flattened", + "title": "GetSession", + "description": "Snippet for GetSession", + "file": "SpannerClient.GetSessionSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSession", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_async_flattened", + "title": "GetSessionAsync", + "description": "Snippet for GetSessionAsync", + "file": "SpannerClient.GetSessionAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSessionAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_sync_flattened_resourceNames", + "title": "GetSessionResourceNames", + "description": "Snippet for GetSession", + "file": "SpannerClient.GetSessionResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Session", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_GetSession_async_flattened_resourceNames", + "title": "GetSessionResourceNamesAsync", + "description": "Snippet for GetSessionAsync", + "file": "SpannerClient.GetSessionResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.GetSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "GetSession", + "fullName": "google.spanner.v1.Spanner.GetSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_sync", + "title": "ListSessionsRequestObject", + "description": "Snippet for ListSessions", + "file": "SpannerClient.ListSessionsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessions", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ListSessionsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 79, + "type": "FULL" + }, + { + "start": 36, + "end": 77, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_async", + "title": "ListSessionsRequestObjectAsync", + "description": "Snippet for ListSessionsAsync", + "file": "SpannerClient.ListSessionsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessionsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ListSessionsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 81, + "type": "FULL" + }, + { + "start": 38, + "end": 79, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_sync_flattened", + "title": "ListSessions", + "description": "Snippet for ListSessions", + "file": "SpannerClient.ListSessionsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessions", + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_async_flattened", + "title": "ListSessionsAsync", + "description": "Snippet for ListSessionsAsync", + "file": "SpannerClient.ListSessionsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessionsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "database" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_sync_flattened_resourceNames", + "title": "ListSessionsResourceNames", + "description": "Snippet for ListSessions", + "file": "SpannerClient.ListSessionsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessions", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessions", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ListSessions_async_flattened_resourceNames", + "title": "ListSessionsResourceNamesAsync", + "description": "Snippet for ListSessionsAsync", + "file": "SpannerClient.ListSessionsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListSessionsAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ListSessionsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DatabaseName", + "name": "database" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.spanner.v1.Spanner.ListSessions", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_sync", + "title": "DeleteSessionRequestObject", + "description": "Snippet for DeleteSession", + "file": "SpannerClient.DeleteSessionRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DeleteSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_async", + "title": "DeleteSessionRequestObjectAsync", + "description": "Snippet for DeleteSessionAsync", + "file": "SpannerClient.DeleteSessionRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.DeleteSessionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_sync_flattened", + "title": "DeleteSession", + "description": "Snippet for DeleteSession", + "file": "SpannerClient.DeleteSessionSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSession", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_async_flattened", + "title": "DeleteSessionAsync", + "description": "Snippet for DeleteSessionAsync", + "file": "SpannerClient.DeleteSessionAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSessionAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_sync_flattened_resourceNames", + "title": "DeleteSessionResourceNames", + "description": "Snippet for DeleteSession", + "file": "SpannerClient.DeleteSessionResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSession", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSession", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_DeleteSession_async_flattened_resourceNames", + "title": "DeleteSessionResourceNamesAsync", + "description": "Snippet for DeleteSessionAsync", + "file": "SpannerClient.DeleteSessionResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteSessionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.DeleteSessionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "DeleteSession", + "fullName": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ExecuteSql_sync", + "title": "ExecuteSqlRequestObject", + "description": "Snippet for ExecuteSql", + "file": "SpannerClient.ExecuteSqlRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ExecuteSql", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ExecuteSql", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ExecuteSqlRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.ResultSet", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ExecuteSql", + "fullName": "google.spanner.v1.Spanner.ExecuteSql", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 66, + "type": "FULL" + }, + { + "start": 38, + "end": 64, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ExecuteSql_async", + "title": "ExecuteSqlRequestObjectAsync", + "description": "Snippet for ExecuteSqlAsync", + "file": "SpannerClient.ExecuteSqlRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ExecuteSqlAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ExecuteSqlAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ExecuteSqlRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ExecuteSql", + "fullName": "google.spanner.v1.Spanner.ExecuteSql", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 67, + "type": "FULL" + }, + { + "start": 39, + "end": 65, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ExecuteStreamingSql_sync", + "title": "ExecuteStreamingSqlRequestObject", + "description": "Snippet for ExecuteStreamingSql", + "file": "SpannerClient.ExecuteStreamingSqlRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ExecuteStreamingSql", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ExecuteStreamingSql", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ExecuteSqlRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.SpannerClient+ExecuteStreamingSqlStream", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ExecuteStreamingSql", + "fullName": "google.spanner.v1.Spanner.ExecuteStreamingSql", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 78, + "type": "FULL" + }, + { + "start": 40, + "end": 76, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ExecuteBatchDml_sync", + "title": "ExecuteBatchDmlRequestObject", + "description": "Snippet for ExecuteBatchDml", + "file": "SpannerClient.ExecuteBatchDmlRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ExecuteBatchDml", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ExecuteBatchDml", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ExecuteBatchDml", + "fullName": "google.spanner.v1.Spanner.ExecuteBatchDml", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 51, + "type": "FULL" + }, + { + "start": 34, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_ExecuteBatchDml_async", + "title": "ExecuteBatchDmlRequestObjectAsync", + "description": "Snippet for ExecuteBatchDmlAsync", + "file": "SpannerClient.ExecuteBatchDmlRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ExecuteBatchDmlAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ExecuteBatchDmlAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "ExecuteBatchDml", + "fullName": "google.spanner.v1.Spanner.ExecuteBatchDml", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 52, + "type": "FULL" + }, + { + "start": 35, + "end": 50, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Read_sync", + "title": "ReadRequestObject", + "description": "Snippet for Read", + "file": "SpannerClient.ReadRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Read", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Read", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ReadRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.ResultSet", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Read", + "fullName": "google.spanner.v1.Spanner.Read", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 56, + "type": "FULL" + }, + { + "start": 35, + "end": 54, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Read_async", + "title": "ReadRequestObjectAsync", + "description": "Snippet for ReadAsync", + "file": "SpannerClient.ReadRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ReadAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.ReadAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ReadRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Read", + "fullName": "google.spanner.v1.Spanner.Read", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 57, + "type": "FULL" + }, + { + "start": 36, + "end": 55, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_StreamingRead_sync", + "title": "StreamingReadRequestObject", + "description": "Snippet for StreamingRead", + "file": "SpannerClient.StreamingReadRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "StreamingRead", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.StreamingRead", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.ReadRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.SpannerClient+StreamingReadStream", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "StreamingRead", + "fullName": "google.spanner.v1.Spanner.StreamingRead", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 68, + "type": "FULL" + }, + { + "start": 37, + "end": 66, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_sync", + "title": "BeginTransactionRequestObject", + "description": "Snippet for BeginTransaction", + "file": "SpannerClient.BeginTransactionRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransaction", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransaction", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.BeginTransactionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Transaction", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 34, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_async", + "title": "BeginTransactionRequestObjectAsync", + "description": "Snippet for BeginTransactionAsync", + "file": "SpannerClient.BeginTransactionRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransactionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransactionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.BeginTransactionRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 35, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_sync_flattened", + "title": "BeginTransaction", + "description": "Snippet for BeginTransaction", + "file": "SpannerClient.BeginTransactionSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransaction", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransaction", + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "options" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Transaction", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 34, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_async_flattened", + "title": "BeginTransactionAsync", + "description": "Snippet for BeginTransactionAsync", + "file": "SpannerClient.BeginTransactionAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransactionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransactionAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "options" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_sync_flattened_resourceNames", + "title": "BeginTransactionResourceNames", + "description": "Snippet for BeginTransaction", + "file": "SpannerClient.BeginTransactionResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransaction", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransaction", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "options" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.Transaction", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 34, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BeginTransaction_async_flattened_resourceNames", + "title": "BeginTransactionResourceNamesAsync", + "description": "Snippet for BeginTransactionAsync", + "file": "SpannerClient.BeginTransactionResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BeginTransactionAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BeginTransactionAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "options" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BeginTransaction", + "fullName": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_sync", + "title": "CommitRequestObject", + "description": "Snippet for Commit", + "file": "SpannerClient.CommitRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Commit", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Commit", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.CommitRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.CommitResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 51, + "type": "FULL" + }, + { + "start": 36, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_async", + "title": "CommitRequestObjectAsync", + "description": "Snippet for CommitAsync", + "file": "SpannerClient.CommitRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CommitAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CommitAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.CommitRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 52, + "type": "FULL" + }, + { + "start": 37, + "end": 50, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_sync_flattened1", + "title": "Commit1", + "description": "Snippet for Commit", + "file": "SpannerClient.Commit1Snippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Commit", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Commit", + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.CommitResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 36, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_async_flattened1", + "title": "Commit1Async", + "description": "Snippet for CommitAsync", + "file": "SpannerClient.Commit1AsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CommitAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CommitAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 37, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_sync_flattened1_resourceNames", + "title": "Commit1ResourceNames", + "description": "Snippet for Commit", + "file": "SpannerClient.Commit1ResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Commit", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Commit", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.CommitResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 36, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_async_flattened1_resourceNames", + "title": "Commit1ResourceNamesAsync", + "description": "Snippet for CommitAsync", + "file": "SpannerClient.Commit1ResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CommitAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CommitAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 37, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_sync_flattened2", + "title": "Commit2", + "description": "Snippet for Commit", + "file": "SpannerClient.Commit2Snippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Commit", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Commit", + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "singleUseTransaction" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.CommitResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 35, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_async_flattened2", + "title": "Commit2Async", + "description": "Snippet for CommitAsync", + "file": "SpannerClient.Commit2AsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CommitAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CommitAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "singleUseTransaction" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 36, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_sync_flattened2_resourceNames", + "title": "Commit2ResourceNames", + "description": "Snippet for Commit", + "file": "SpannerClient.Commit2ResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Commit", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Commit", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "singleUseTransaction" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.CommitResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 35, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Commit_async_flattened2_resourceNames", + "title": "Commit2ResourceNamesAsync", + "description": "Snippet for CommitAsync", + "file": "SpannerClient.Commit2ResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CommitAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.CommitAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Cloud.Spanner.V1.TransactionOptions", + "name": "singleUseTransaction" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutations" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Commit", + "fullName": "google.spanner.v1.Spanner.Commit", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 36, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_sync", + "title": "RollbackRequestObject", + "description": "Snippet for Rollback", + "file": "SpannerClient.RollbackRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Rollback", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Rollback", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.RollbackRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_async", + "title": "RollbackRequestObjectAsync", + "description": "Snippet for RollbackAsync", + "file": "SpannerClient.RollbackRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "RollbackAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.RollbackAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.RollbackRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_sync_flattened", + "title": "Rollback", + "description": "Snippet for Rollback", + "file": "SpannerClient.RollbackSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Rollback", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Rollback", + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_async_flattened", + "title": "RollbackAsync", + "description": "Snippet for RollbackAsync", + "file": "SpannerClient.RollbackAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "RollbackAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.RollbackAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_sync_flattened_resourceNames", + "title": "RollbackResourceNames", + "description": "Snippet for Rollback", + "file": "SpannerClient.RollbackResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "Rollback", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.Rollback", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_Rollback_async_flattened_resourceNames", + "title": "RollbackResourceNamesAsync", + "description": "Snippet for RollbackAsync", + "file": "SpannerClient.RollbackResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "RollbackAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.RollbackAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "Google.Protobuf.ByteString", + "name": "transactionId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "Rollback", + "fullName": "google.spanner.v1.Spanner.Rollback", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_PartitionQuery_sync", + "title": "PartitionQueryRequestObject", + "description": "Snippet for PartitionQuery", + "file": "SpannerClient.PartitionQueryRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PartitionQuery", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.PartitionQuery", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.PartitionQueryRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.PartitionResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "PartitionQuery", + "fullName": "google.spanner.v1.Spanner.PartitionQuery", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 58, + "type": "FULL" + }, + { + "start": 37, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_PartitionQuery_async", + "title": "PartitionQueryRequestObjectAsync", + "description": "Snippet for PartitionQueryAsync", + "file": "SpannerClient.PartitionQueryRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PartitionQueryAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.PartitionQueryAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.PartitionQueryRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "PartitionQuery", + "fullName": "google.spanner.v1.Spanner.PartitionQuery", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 22, + "end": 59, + "type": "FULL" + }, + { + "start": 38, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_PartitionRead_sync", + "title": "PartitionReadRequestObject", + "description": "Snippet for PartitionRead", + "file": "SpannerClient.PartitionReadRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PartitionRead", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.PartitionRead", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.PartitionReadRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.PartitionResponse", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "PartitionRead", + "fullName": "google.spanner.v1.Spanner.PartitionRead", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + }, + { + "start": 34, + "end": 48, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_PartitionRead_async", + "title": "PartitionReadRequestObjectAsync", + "description": "Snippet for PartitionReadAsync", + "file": "SpannerClient.PartitionReadRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PartitionReadAsync", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.PartitionReadAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.PartitionReadRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "PartitionRead", + "fullName": "google.spanner.v1.Spanner.PartitionRead", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 51, + "type": "FULL" + }, + { + "start": 35, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchWrite_sync", + "title": "BatchWriteRequestObject", + "description": "Snippet for BatchWrite", + "file": "SpannerClient.BatchWriteRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchWrite", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchWrite", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.BatchWriteRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.SpannerClient+BatchWriteStream", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchWrite", + "fullName": "google.spanner.v1.Spanner.BatchWrite", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 62, + "type": "FULL" + }, + { + "start": 36, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchWrite_sync_flattened", + "title": "BatchWrite", + "description": "Snippet for BatchWrite", + "file": "SpannerClient.BatchWriteSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchWrite", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchWrite", + "parameters": [ + { + "type": "System.String", + "name": "session" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutationGroups" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.SpannerClient+BatchWriteStream", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchWrite", + "fullName": "google.spanner.v1.Spanner.BatchWrite", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 37, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "spanner_v1_generated_Spanner_BatchWrite_sync_flattened_resourceNames", + "title": "BatchWriteResourceNames", + "description": "Snippet for BatchWrite", + "file": "SpannerClient.BatchWriteResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchWrite", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient.BatchWrite", + "parameters": [ + { + "type": "Google.Cloud.Spanner.V1.SessionName", + "name": "session" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "mutationGroups" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Spanner.V1.SpannerClient+BatchWriteStream", + "client": { + "shortName": "SpannerClient", + "fullName": "Google.Cloud.Spanner.V1.SpannerClient" + }, + "method": { + "shortName": "BatchWrite", + "fullName": "google.spanner.v1.Spanner.BatchWrite", + "service": { + "shortName": "Spanner", + "fullName": "google.spanner.v1.Spanner" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 37, + "end": 56, + "type": "SHORT" + } + ] + } + ] +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/Google.Cloud.Spanner.V1.Snippets.csproj b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/Google.Cloud.Spanner.V1.Snippets.csproj new file mode 100755 index 000000000000..577720da31a5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/Google.Cloud.Spanner.V1.Snippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/SpannerClientSnippets.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/SpannerClientSnippets.g.cs new file mode 100755 index 000000000000..316d893d7454 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.Snippets/SpannerClientSnippets.g.cs @@ -0,0 +1,1493 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 + +namespace GoogleCSharpSnippets +{ + using Google.Api.Gax; + using Google.Api.Gax.Grpc; + using Google.Protobuf; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using gcsv = Google.Cloud.Spanner.V1; + + /// Generated snippets. + public sealed class AllGeneratedSpannerClientSnippets + { + /// Snippet for CreateSession + public void CreateSessionRequestObject() + { + // Snippet: CreateSession(CreateSessionRequest, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::CreateSessionRequest request = new gcsv::CreateSessionRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Session = new gcsv::Session(), + }; + // Make the request + gcsv::Session response = spannerClient.CreateSession(request); + // End snippet + } + + /// Snippet for CreateSessionAsync + public async Task CreateSessionRequestObjectAsync() + { + // Snippet: CreateSessionAsync(CreateSessionRequest, CallSettings) + // Additional: CreateSessionAsync(CreateSessionRequest, CancellationToken) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::CreateSessionRequest request = new gcsv::CreateSessionRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Session = new gcsv::Session(), + }; + // Make the request + gcsv::Session response = await spannerClient.CreateSessionAsync(request); + // End snippet + } + + /// Snippet for CreateSession + public void CreateSession() + { + // Snippet: CreateSession(string, CallSettings) + // 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); + // End snippet + } + + /// Snippet for CreateSessionAsync + public async Task CreateSessionAsync() + { + // Snippet: CreateSessionAsync(string, CallSettings) + // Additional: CreateSessionAsync(string, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for CreateSession + public void CreateSessionResourceNames() + { + // Snippet: CreateSession(DatabaseName, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + gcsv::Session response = spannerClient.CreateSession(database); + // End snippet + } + + /// Snippet for CreateSessionAsync + public async Task CreateSessionResourceNamesAsync() + { + // Snippet: CreateSessionAsync(DatabaseName, CallSettings) + // Additional: CreateSessionAsync(DatabaseName, CancellationToken) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + gcsv::Session response = await spannerClient.CreateSessionAsync(database); + // End snippet + } + + /// Snippet for BatchCreateSessions + public void BatchCreateSessionsRequestObject() + { + // Snippet: BatchCreateSessions(BatchCreateSessionsRequest, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::BatchCreateSessionsRequest request = new gcsv::BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + SessionTemplate = new gcsv::Session(), + SessionCount = 0, + }; + // Make the request + gcsv::BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(request); + // End snippet + } + + /// Snippet for BatchCreateSessionsAsync + public async Task BatchCreateSessionsRequestObjectAsync() + { + // Snippet: BatchCreateSessionsAsync(BatchCreateSessionsRequest, CallSettings) + // Additional: BatchCreateSessionsAsync(BatchCreateSessionsRequest, CancellationToken) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::BatchCreateSessionsRequest request = new gcsv::BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + SessionTemplate = new gcsv::Session(), + SessionCount = 0, + }; + // Make the request + gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(request); + // End snippet + } + + /// Snippet for BatchCreateSessions + public void BatchCreateSessions() + { + // Snippet: BatchCreateSessions(string, int, CallSettings) + // 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); + // End snippet + } + + /// Snippet for BatchCreateSessionsAsync + public async Task BatchCreateSessionsAsync() + { + // Snippet: BatchCreateSessionsAsync(string, int, CallSettings) + // Additional: BatchCreateSessionsAsync(string, int, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for BatchCreateSessions + public void BatchCreateSessionsResourceNames() + { + // Snippet: BatchCreateSessions(DatabaseName, int, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + int sessionCount = 0; + // Make the request + gcsv::BatchCreateSessionsResponse response = spannerClient.BatchCreateSessions(database, sessionCount); + // End snippet + } + + /// Snippet for BatchCreateSessionsAsync + public async Task BatchCreateSessionsResourceNamesAsync() + { + // Snippet: BatchCreateSessionsAsync(DatabaseName, int, CallSettings) + // Additional: BatchCreateSessionsAsync(DatabaseName, int, CancellationToken) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + int sessionCount = 0; + // Make the request + gcsv::BatchCreateSessionsResponse response = await spannerClient.BatchCreateSessionsAsync(database, sessionCount); + // End snippet + } + + /// Snippet for GetSession + public void GetSessionRequestObject() + { + // Snippet: GetSession(GetSessionRequest, CallSettings) + // 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); + // End snippet + } + + /// Snippet for GetSessionAsync + public async Task GetSessionRequestObjectAsync() + { + // Snippet: GetSessionAsync(GetSessionRequest, CallSettings) + // Additional: GetSessionAsync(GetSessionRequest, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for GetSession + public void GetSession() + { + // Snippet: GetSession(string, CallSettings) + // 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); + // End snippet + } + + /// Snippet for GetSessionAsync + public async Task GetSessionAsync() + { + // Snippet: GetSessionAsync(string, CallSettings) + // Additional: GetSessionAsync(string, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for GetSession + public void GetSessionResourceNames() + { + // Snippet: GetSession(SessionName, CallSettings) + // 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); + // End snippet + } + + /// Snippet for GetSessionAsync + public async Task GetSessionResourceNamesAsync() + { + // Snippet: GetSessionAsync(SessionName, CallSettings) + // Additional: GetSessionAsync(SessionName, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for ListSessions + public void ListSessionsRequestObject() + { + // Snippet: ListSessions(ListSessionsRequest, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::ListSessionsRequest request = new gcsv::ListSessionsRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Filter = "", + }; + // Make the request + PagedEnumerable 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 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; + // End snippet + } + + /// Snippet for ListSessionsAsync + public async Task ListSessionsRequestObjectAsync() + { + // Snippet: ListSessionsAsync(ListSessionsRequest, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::ListSessionsRequest request = new gcsv::ListSessionsRequest + { + DatabaseAsDatabaseName = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"), + Filter = "", + }; + // Make the request + PagedAsyncEnumerable response = spannerClient.ListSessionsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcsv::Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcsv::ListSessionsResponse page) => + { + // 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 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; + // End snippet + } + + /// Snippet for ListSessions + public void ListSessions() + { + // Snippet: ListSessions(string, string, int?, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + string database = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"; + // Make the request + PagedEnumerable 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 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; + // End snippet + } + + /// Snippet for ListSessionsAsync + public async Task ListSessionsAsync() + { + // Snippet: ListSessionsAsync(string, string, int?, CallSettings) + // 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 response = spannerClient.ListSessionsAsync(database); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcsv::Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcsv::ListSessionsResponse page) => + { + // 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 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; + // End snippet + } + + /// Snippet for ListSessions + public void ListSessionsResourceNames() + { + // Snippet: ListSessions(DatabaseName, string, int?, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + PagedEnumerable 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 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; + // End snippet + } + + /// Snippet for ListSessionsAsync + public async Task ListSessionsResourceNamesAsync() + { + // Snippet: ListSessionsAsync(DatabaseName, string, int?, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = await gcsv::SpannerClient.CreateAsync(); + // Initialize request argument(s) + gcsv::DatabaseName database = gcsv::DatabaseName.FromProjectInstanceDatabase("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + // Make the request + PagedAsyncEnumerable response = spannerClient.ListSessionsAsync(database); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((gcsv::Session item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((gcsv::ListSessionsResponse page) => + { + // 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 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; + // End snippet + } + + /// Snippet for DeleteSession + public void DeleteSessionRequestObject() + { + // Snippet: DeleteSession(DeleteSessionRequest, CallSettings) + // 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); + // End snippet + } + + /// Snippet for DeleteSessionAsync + public async Task DeleteSessionRequestObjectAsync() + { + // Snippet: DeleteSessionAsync(DeleteSessionRequest, CallSettings) + // Additional: DeleteSessionAsync(DeleteSessionRequest, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for DeleteSession + public void DeleteSession() + { + // Snippet: DeleteSession(string, CallSettings) + // 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); + // End snippet + } + + /// Snippet for DeleteSessionAsync + public async Task DeleteSessionAsync() + { + // Snippet: DeleteSessionAsync(string, CallSettings) + // Additional: DeleteSessionAsync(string, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for DeleteSession + public void DeleteSessionResourceNames() + { + // Snippet: DeleteSession(SessionName, CallSettings) + // 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); + // End snippet + } + + /// Snippet for DeleteSessionAsync + public async Task DeleteSessionResourceNamesAsync() + { + // Snippet: DeleteSessionAsync(SessionName, CallSettings) + // Additional: DeleteSessionAsync(SessionName, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for ExecuteSql + public void ExecuteSqlRequestObject() + { + // Snippet: ExecuteSql(ExecuteSqlRequest, CallSettings) + // 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, + }; + // Make the request + gcsv::ResultSet response = spannerClient.ExecuteSql(request); + // End snippet + } + + /// Snippet for ExecuteSqlAsync + public async Task ExecuteSqlRequestObjectAsync() + { + // Snippet: ExecuteSqlAsync(ExecuteSqlRequest, CallSettings) + // Additional: ExecuteSqlAsync(ExecuteSqlRequest, CancellationToken) + // 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, + }; + // Make the request + gcsv::ResultSet response = await spannerClient.ExecuteSqlAsync(request); + // End snippet + } + + /// Snippet for ExecuteStreamingSql + public async Task ExecuteStreamingSqlRequestObject() + { + // Snippet: ExecuteStreamingSql(ExecuteSqlRequest, CallSettings) + // 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, + }; + // 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::PartialResultSet responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + // End snippet + } + + /// Snippet for ExecuteBatchDml + public void ExecuteBatchDmlRequestObject() + { + // Snippet: ExecuteBatchDml(ExecuteBatchDmlRequest, CallSettings) + // 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(), + }; + // Make the request + gcsv::ExecuteBatchDmlResponse response = spannerClient.ExecuteBatchDml(request); + // End snippet + } + + /// Snippet for ExecuteBatchDmlAsync + public async Task ExecuteBatchDmlRequestObjectAsync() + { + // Snippet: ExecuteBatchDmlAsync(ExecuteBatchDmlRequest, CallSettings) + // Additional: ExecuteBatchDmlAsync(ExecuteBatchDmlRequest, CancellationToken) + // 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(), + }; + // Make the request + gcsv::ExecuteBatchDmlResponse response = await spannerClient.ExecuteBatchDmlAsync(request); + // End snippet + } + + /// Snippet for Read + public void ReadRequestObject() + { + // Snippet: Read(ReadRequest, CallSettings) + // 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, + }; + // Make the request + gcsv::ResultSet response = spannerClient.Read(request); + // End snippet + } + + /// Snippet for ReadAsync + public async Task ReadRequestObjectAsync() + { + // Snippet: ReadAsync(ReadRequest, CallSettings) + // Additional: ReadAsync(ReadRequest, CancellationToken) + // 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, + }; + // Make the request + gcsv::ResultSet response = await spannerClient.ReadAsync(request); + // End snippet + } + + /// Snippet for StreamingRead + public async Task StreamingReadRequestObject() + { + // Snippet: StreamingRead(ReadRequest, CallSettings) + // 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, + }; + // 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::PartialResultSet responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + // End snippet + } + + /// Snippet for BeginTransaction + public void BeginTransactionRequestObject() + { + // Snippet: BeginTransaction(BeginTransactionRequest, CallSettings) + // 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(), + }; + // Make the request + gcsv::Transaction response = spannerClient.BeginTransaction(request); + // End snippet + } + + /// Snippet for BeginTransactionAsync + public async Task BeginTransactionRequestObjectAsync() + { + // Snippet: BeginTransactionAsync(BeginTransactionRequest, CallSettings) + // Additional: BeginTransactionAsync(BeginTransactionRequest, CancellationToken) + // 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(), + }; + // Make the request + gcsv::Transaction response = await spannerClient.BeginTransactionAsync(request); + // End snippet + } + + /// Snippet for BeginTransaction + public void BeginTransaction() + { + // Snippet: BeginTransaction(string, TransactionOptions, CallSettings) + // 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); + // End snippet + } + + /// Snippet for BeginTransactionAsync + public async Task BeginTransactionAsync() + { + // Snippet: BeginTransactionAsync(string, TransactionOptions, CallSettings) + // Additional: BeginTransactionAsync(string, TransactionOptions, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for BeginTransaction + public void BeginTransactionResourceNames() + { + // Snippet: BeginTransaction(SessionName, TransactionOptions, CallSettings) + // 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); + // End snippet + } + + /// Snippet for BeginTransactionAsync + public async Task BeginTransactionResourceNamesAsync() + { + // Snippet: BeginTransactionAsync(SessionName, TransactionOptions, CallSettings) + // Additional: BeginTransactionAsync(SessionName, TransactionOptions, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for Commit + public void CommitRequestObject() + { + // Snippet: Commit(CommitRequest, CallSettings) + // 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(), + }; + // Make the request + gcsv::CommitResponse response = spannerClient.Commit(request); + // End snippet + } + + /// Snippet for CommitAsync + public async Task CommitRequestObjectAsync() + { + // Snippet: CommitAsync(CommitRequest, CallSettings) + // Additional: CommitAsync(CommitRequest, CancellationToken) + // 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(), + }; + // Make the request + gcsv::CommitResponse response = await spannerClient.CommitAsync(request); + // End snippet + } + + /// Snippet for Commit + public void Commit1() + { + // Snippet: Commit(string, ByteString, IEnumerable, CallSettings) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = spannerClient.Commit(session, transactionId, mutations); + // End snippet + } + + /// Snippet for CommitAsync + public async Task Commit1Async() + { + // Snippet: CommitAsync(string, ByteString, IEnumerable, CallSettings) + // Additional: CommitAsync(string, ByteString, IEnumerable, CancellationToken) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations); + // End snippet + } + + /// Snippet for Commit + public void Commit1ResourceNames() + { + // Snippet: Commit(SessionName, ByteString, IEnumerable, CallSettings) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = spannerClient.Commit(session, transactionId, mutations); + // End snippet + } + + /// Snippet for CommitAsync + public async Task Commit1ResourceNamesAsync() + { + // Snippet: CommitAsync(SessionName, ByteString, IEnumerable, CallSettings) + // Additional: CommitAsync(SessionName, ByteString, IEnumerable, CancellationToken) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = await spannerClient.CommitAsync(session, transactionId, mutations); + // End snippet + } + + /// Snippet for Commit + public void Commit2() + { + // Snippet: Commit(string, TransactionOptions, IEnumerable, CallSettings) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations); + // End snippet + } + + /// Snippet for CommitAsync + public async Task Commit2Async() + { + // Snippet: CommitAsync(string, TransactionOptions, IEnumerable, CallSettings) + // Additional: CommitAsync(string, TransactionOptions, IEnumerable, CancellationToken) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations); + // End snippet + } + + /// Snippet for Commit + public void Commit2ResourceNames() + { + // Snippet: Commit(SessionName, TransactionOptions, IEnumerable, CallSettings) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = spannerClient.Commit(session, singleUseTransaction, mutations); + // End snippet + } + + /// Snippet for CommitAsync + public async Task Commit2ResourceNamesAsync() + { + // Snippet: CommitAsync(SessionName, TransactionOptions, IEnumerable, CallSettings) + // Additional: CommitAsync(SessionName, TransactionOptions, IEnumerable, CancellationToken) + // 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 mutations = new gcsv::Mutation[] + { + new gcsv::Mutation(), + }; + // Make the request + gcsv::CommitResponse response = await spannerClient.CommitAsync(session, singleUseTransaction, mutations); + // End snippet + } + + /// Snippet for Rollback + public void RollbackRequestObject() + { + // Snippet: Rollback(RollbackRequest, CallSettings) + // 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); + // End snippet + } + + /// Snippet for RollbackAsync + public async Task RollbackRequestObjectAsync() + { + // Snippet: RollbackAsync(RollbackRequest, CallSettings) + // Additional: RollbackAsync(RollbackRequest, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for Rollback + public void Rollback() + { + // Snippet: Rollback(string, ByteString, CallSettings) + // 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); + // End snippet + } + + /// Snippet for RollbackAsync + public async Task RollbackAsync() + { + // Snippet: RollbackAsync(string, ByteString, CallSettings) + // Additional: RollbackAsync(string, ByteString, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for Rollback + public void RollbackResourceNames() + { + // Snippet: Rollback(SessionName, ByteString, CallSettings) + // 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); + // End snippet + } + + /// Snippet for RollbackAsync + public async Task RollbackResourceNamesAsync() + { + // Snippet: RollbackAsync(SessionName, ByteString, CallSettings) + // Additional: RollbackAsync(SessionName, ByteString, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for PartitionQuery + public void PartitionQueryRequestObject() + { + // Snippet: PartitionQuery(PartitionQueryRequest, CallSettings) + // 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); + // End snippet + } + + /// Snippet for PartitionQueryAsync + public async Task PartitionQueryRequestObjectAsync() + { + // Snippet: PartitionQueryAsync(PartitionQueryRequest, CallSettings) + // Additional: PartitionQueryAsync(PartitionQueryRequest, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for PartitionRead + public void PartitionReadRequestObject() + { + // Snippet: PartitionRead(PartitionReadRequest, CallSettings) + // 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); + // End snippet + } + + /// Snippet for PartitionReadAsync + public async Task PartitionReadRequestObjectAsync() + { + // Snippet: PartitionReadAsync(PartitionReadRequest, CallSettings) + // Additional: PartitionReadAsync(PartitionReadRequest, CancellationToken) + // 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); + // End snippet + } + + /// Snippet for BatchWrite + public async Task BatchWriteRequestObject() + { + // Snippet: BatchWrite(BatchWriteRequest, CallSettings) + // 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + // End snippet + } + + /// Snippet for BatchWrite + public async Task BatchWrite() + { + // Snippet: BatchWrite(string, IEnumerable, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + string session = "projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]/sessions/[SESSION]"; + IEnumerable 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + // End snippet + } + + /// Snippet for BatchWrite + public async Task BatchWriteResourceNames() + { + // Snippet: BatchWrite(SessionName, IEnumerable, CallSettings) + // Create client + gcsv::SpannerClient spannerClient = gcsv::SpannerClient.Create(); + // Initialize request argument(s) + gcsv::SessionName session = gcsv::SessionName.FromProjectInstanceDatabaseSession("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); + IEnumerable 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 responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + gcsv::BatchWriteResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + // End snippet + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/CommitResponse.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/CommitResponse.g.cs new file mode 100755 index 000000000000..66c64948e431 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/CommitResponse.g.cs @@ -0,0 +1,518 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/commit_response.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/commit_response.proto + public static partial class CommitResponseReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/commit_response.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CommitResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cidnb29nbGUvc3Bhbm5lci92MS9jb21taXRfcmVzcG9uc2UucHJvdG8SEWdv", + "b2dsZS5zcGFubmVyLnYxGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnBy", + "b3RvIrIBCg5Db21taXRSZXNwb25zZRI0ChBjb21taXRfdGltZXN0YW1wGAEg", + "ASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBJDCgxjb21taXRfc3Rh", + "dHMYAiABKAsyLS5nb29nbGUuc3Bhbm5lci52MS5Db21taXRSZXNwb25zZS5D", + "b21taXRTdGF0cxolCgtDb21taXRTdGF0cxIWCg5tdXRhdGlvbl9jb3VudBgB", + "IAEoA0K2AQoVY29tLmdvb2dsZS5zcGFubmVyLnYxQhNDb21taXRSZXNwb25z", + "ZVByb3RvUAFaNWNsb3VkLmdvb2dsZS5jb20vZ28vc3Bhbm5lci9hcGl2MS9z", + "cGFubmVycGI7c3Bhbm5lcnBiqgIXR29vZ2xlLkNsb3VkLlNwYW5uZXIuVjHK", + "AhdHb29nbGVcQ2xvdWRcU3Bhbm5lclxWMeoCGkdvb2dsZTo6Q2xvdWQ6OlNw", + "YW5uZXI6OlYxYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.CommitResponse), global::Google.Cloud.Spanner.V1.CommitResponse.Parser, new[]{ "CommitTimestamp", "CommitStats" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats), global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats.Parser, new[]{ "MutationCount" }, null, null, null, null)}) + })); + } + #endregion + + } + #region Messages + /// + /// The response for [Commit][google.spanner.v1.Spanner.Commit]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CommitResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CommitResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.CommitResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitResponse(CommitResponse other) : this() { + commitTimestamp_ = other.commitTimestamp_ != null ? other.commitTimestamp_.Clone() : null; + commitStats_ = other.commitStats_ != null ? other.commitStats_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitResponse Clone() { + return new CommitResponse(this); + } + + /// Field number for the "commit_timestamp" field. + public const int CommitTimestampFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Timestamp commitTimestamp_; + /// + /// The Cloud Spanner timestamp at which the transaction committed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CommitTimestamp { + get { return commitTimestamp_; } + set { + commitTimestamp_ = value; + } + } + + /// Field number for the "commit_stats" field. + public const int CommitStatsFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats commitStats_; + /// + /// The statistics about this Commit. Not returned by default. + /// For more information, see + /// [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats CommitStats { + get { return commitStats_; } + set { + commitStats_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CommitResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CommitResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(CommitTimestamp, other.CommitTimestamp)) return false; + if (!object.Equals(CommitStats, other.CommitStats)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (commitTimestamp_ != null) hash ^= CommitTimestamp.GetHashCode(); + if (commitStats_ != null) hash ^= CommitStats.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (commitTimestamp_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CommitTimestamp); + } + if (commitStats_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CommitStats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (commitTimestamp_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CommitTimestamp); + } + if (commitStats_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CommitStats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (commitTimestamp_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CommitTimestamp); + } + if (commitStats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CommitStats); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CommitResponse other) { + if (other == null) { + return; + } + if (other.commitTimestamp_ != null) { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CommitTimestamp.MergeFrom(other.CommitTimestamp); + } + if (other.commitStats_ != null) { + if (commitStats_ == null) { + CommitStats = new global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats(); + } + CommitStats.MergeFrom(other.CommitStats); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CommitTimestamp); + break; + } + case 18: { + if (commitStats_ == null) { + CommitStats = new global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats(); + } + input.ReadMessage(CommitStats); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CommitTimestamp); + break; + } + case 18: { + if (commitStats_ == null) { + CommitStats = new global::Google.Cloud.Spanner.V1.CommitResponse.Types.CommitStats(); + } + input.ReadMessage(CommitStats); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CommitResponse message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Additional statistics about a commit. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CommitStats : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CommitStats()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.CommitResponse.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitStats() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitStats(CommitStats other) : this() { + mutationCount_ = other.mutationCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitStats Clone() { + return new CommitStats(this); + } + + /// Field number for the "mutation_count" field. + public const int MutationCountFieldNumber = 1; + private long mutationCount_; + /// + /// The total number of mutations for the transaction. Knowing the + /// `mutation_count` value can help you maximize the number of mutations + /// in a transaction and minimize the number of API round trips. You can + /// also monitor this value to prevent transactions from exceeding the system + /// [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). + /// If the number of mutations exceeds the limit, the server returns + /// [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MutationCount { + get { return mutationCount_; } + set { + mutationCount_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CommitStats); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CommitStats other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MutationCount != other.MutationCount) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MutationCount != 0L) hash ^= MutationCount.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MutationCount != 0L) { + output.WriteRawTag(8); + output.WriteInt64(MutationCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MutationCount != 0L) { + output.WriteRawTag(8); + output.WriteInt64(MutationCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MutationCount != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MutationCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CommitStats other) { + if (other == null) { + return; + } + if (other.MutationCount != 0L) { + MutationCount = other.MutationCount; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MutationCount = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MutationCount = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.csproj b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.csproj new file mode 100755 index 000000000000..2058a9a4c33b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1.csproj @@ -0,0 +1,47 @@ + + + + + + 1.0.0-alpha01 + + + + + + + + + netstandard2.0;net462 + latest + true + true + true + + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Keys.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Keys.g.cs new file mode 100755 index 000000000000..a5ac2ef48e2f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Keys.g.cs @@ -0,0 +1,847 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/keys.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/keys.proto + public static partial class KeysReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/keys.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static KeysReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chxnb29nbGUvc3Bhbm5lci92MS9rZXlzLnByb3RvEhFnb29nbGUuc3Bhbm5l", + "ci52MRocZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90byL0AQoIS2V5UmFu", + "Z2USMgoMc3RhcnRfY2xvc2VkGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxp", + "c3RWYWx1ZUgAEjAKCnN0YXJ0X29wZW4YAiABKAsyGi5nb29nbGUucHJvdG9i", + "dWYuTGlzdFZhbHVlSAASMAoKZW5kX2Nsb3NlZBgDIAEoCzIaLmdvb2dsZS5w", + "cm90b2J1Zi5MaXN0VmFsdWVIARIuCghlbmRfb3BlbhgEIAEoCzIaLmdvb2ds", + "ZS5wcm90b2J1Zi5MaXN0VmFsdWVIAUIQCg5zdGFydF9rZXlfdHlwZUIOCgxl", + "bmRfa2V5X3R5cGUibAoGS2V5U2V0EigKBGtleXMYASADKAsyGi5nb29nbGUu", + "cHJvdG9idWYuTGlzdFZhbHVlEisKBnJhbmdlcxgCIAMoCzIbLmdvb2dsZS5z", + "cGFubmVyLnYxLktleVJhbmdlEgsKA2FsbBgDIAEoCEKsAQoVY29tLmdvb2ds", + "ZS5zcGFubmVyLnYxQglLZXlzUHJvdG9QAVo1Y2xvdWQuZ29vZ2xlLmNvbS9n", + "by9zcGFubmVyL2FwaXYxL3NwYW5uZXJwYjtzcGFubmVycGKqAhdHb29nbGUu", + "Q2xvdWQuU3Bhbm5lci5WMcoCF0dvb2dsZVxDbG91ZFxTcGFubmVyXFYx6gIa", + "R29vZ2xlOjpDbG91ZDo6U3Bhbm5lcjo6VjFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.KeyRange), global::Google.Cloud.Spanner.V1.KeyRange.Parser, new[]{ "StartClosed", "StartOpen", "EndClosed", "EndOpen" }, new[]{ "StartKeyType", "EndKeyType" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.KeySet), global::Google.Cloud.Spanner.V1.KeySet.Parser, new[]{ "Keys", "Ranges", "All" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// KeyRange represents a range of rows in a table or index. + /// + /// A range has a start key and an end key. These keys can be open or + /// closed, indicating if the range includes rows with that key. + /// + /// Keys are represented by lists, where the ith value in the list + /// corresponds to the ith component of the table or index primary key. + /// Individual values are encoded as described + /// [here][google.spanner.v1.TypeCode]. + /// + /// For example, consider the following table definition: + /// + /// CREATE TABLE UserEvents ( + /// UserName STRING(MAX), + /// EventDate STRING(10) + /// ) PRIMARY KEY(UserName, EventDate); + /// + /// The following keys name rows in this table: + /// + /// ["Bob", "2014-09-23"] + /// ["Alfred", "2015-06-12"] + /// + /// Since the `UserEvents` table's `PRIMARY KEY` clause names two + /// columns, each `UserEvents` key has two elements; the first is the + /// `UserName`, and the second is the `EventDate`. + /// + /// Key ranges with multiple components are interpreted + /// lexicographically by component using the table or index key's declared + /// sort order. For example, the following range returns all events for + /// user `"Bob"` that occurred in the year 2015: + /// + /// "start_closed": ["Bob", "2015-01-01"] + /// "end_closed": ["Bob", "2015-12-31"] + /// + /// Start and end keys can omit trailing key components. This affects the + /// inclusion and exclusion of rows that exactly match the provided key + /// components: if the key is closed, then rows that exactly match the + /// provided components are included; if the key is open, then rows + /// that exactly match are not included. + /// + /// For example, the following range includes all events for `"Bob"` that + /// occurred during and after the year 2000: + /// + /// "start_closed": ["Bob", "2000-01-01"] + /// "end_closed": ["Bob"] + /// + /// The next example retrieves all events for `"Bob"`: + /// + /// "start_closed": ["Bob"] + /// "end_closed": ["Bob"] + /// + /// To retrieve events before the year 2000: + /// + /// "start_closed": ["Bob"] + /// "end_open": ["Bob", "2000-01-01"] + /// + /// The following range includes all rows in the table: + /// + /// "start_closed": [] + /// "end_closed": [] + /// + /// This range returns all users whose `UserName` begins with any + /// character from A to C: + /// + /// "start_closed": ["A"] + /// "end_open": ["D"] + /// + /// This range returns all users whose `UserName` begins with B: + /// + /// "start_closed": ["B"] + /// "end_open": ["C"] + /// + /// Key ranges honor column sort order. For example, suppose a table is + /// defined as follows: + /// + /// CREATE TABLE DescendingSortedTable { + /// Key INT64, + /// ... + /// ) PRIMARY KEY(Key DESC); + /// + /// The following range retrieves all rows with key values between 1 + /// and 100 inclusive: + /// + /// "start_closed": ["100"] + /// "end_closed": ["1"] + /// + /// Note that 100 is passed as the start, and 1 is passed as the end, + /// because `Key` is a descending column in the schema. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeyRange : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeyRange()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.KeysReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeyRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeyRange(KeyRange other) : this() { + switch (other.StartKeyTypeCase) { + case StartKeyTypeOneofCase.StartClosed: + StartClosed = other.StartClosed.Clone(); + break; + case StartKeyTypeOneofCase.StartOpen: + StartOpen = other.StartOpen.Clone(); + break; + } + + switch (other.EndKeyTypeCase) { + case EndKeyTypeOneofCase.EndClosed: + EndClosed = other.EndClosed.Clone(); + break; + case EndKeyTypeOneofCase.EndOpen: + EndOpen = other.EndOpen.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeyRange Clone() { + return new KeyRange(this); + } + + /// Field number for the "start_closed" field. + public const int StartClosedFieldNumber = 1; + /// + /// If the start is closed, then the range includes all rows whose + /// first `len(start_closed)` key columns exactly match `start_closed`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.ListValue StartClosed { + get { return startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed ? (global::Google.Protobuf.WellKnownTypes.ListValue) startKeyType_ : null; } + set { + startKeyType_ = value; + startKeyTypeCase_ = value == null ? StartKeyTypeOneofCase.None : StartKeyTypeOneofCase.StartClosed; + } + } + + /// Field number for the "start_open" field. + public const int StartOpenFieldNumber = 2; + /// + /// If the start is open, then the range excludes rows whose first + /// `len(start_open)` key columns exactly match `start_open`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.ListValue StartOpen { + get { return startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen ? (global::Google.Protobuf.WellKnownTypes.ListValue) startKeyType_ : null; } + set { + startKeyType_ = value; + startKeyTypeCase_ = value == null ? StartKeyTypeOneofCase.None : StartKeyTypeOneofCase.StartOpen; + } + } + + /// Field number for the "end_closed" field. + public const int EndClosedFieldNumber = 3; + /// + /// If the end is closed, then the range includes all rows whose + /// first `len(end_closed)` key columns exactly match `end_closed`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.ListValue EndClosed { + get { return endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed ? (global::Google.Protobuf.WellKnownTypes.ListValue) endKeyType_ : null; } + set { + endKeyType_ = value; + endKeyTypeCase_ = value == null ? EndKeyTypeOneofCase.None : EndKeyTypeOneofCase.EndClosed; + } + } + + /// Field number for the "end_open" field. + public const int EndOpenFieldNumber = 4; + /// + /// If the end is open, then the range excludes rows whose first + /// `len(end_open)` key columns exactly match `end_open`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.ListValue EndOpen { + get { return endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen ? (global::Google.Protobuf.WellKnownTypes.ListValue) endKeyType_ : null; } + set { + endKeyType_ = value; + endKeyTypeCase_ = value == null ? EndKeyTypeOneofCase.None : EndKeyTypeOneofCase.EndOpen; + } + } + + private object startKeyType_; + /// Enum of possible cases for the "start_key_type" oneof. + public enum StartKeyTypeOneofCase { + None = 0, + StartClosed = 1, + StartOpen = 2, + } + private StartKeyTypeOneofCase startKeyTypeCase_ = StartKeyTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StartKeyTypeOneofCase StartKeyTypeCase { + get { return startKeyTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStartKeyType() { + startKeyTypeCase_ = StartKeyTypeOneofCase.None; + startKeyType_ = null; + } + + private object endKeyType_; + /// Enum of possible cases for the "end_key_type" oneof. + public enum EndKeyTypeOneofCase { + None = 0, + EndClosed = 3, + EndOpen = 4, + } + private EndKeyTypeOneofCase endKeyTypeCase_ = EndKeyTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EndKeyTypeOneofCase EndKeyTypeCase { + get { return endKeyTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEndKeyType() { + endKeyTypeCase_ = EndKeyTypeOneofCase.None; + endKeyType_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as KeyRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(KeyRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(StartClosed, other.StartClosed)) return false; + if (!object.Equals(StartOpen, other.StartOpen)) return false; + if (!object.Equals(EndClosed, other.EndClosed)) return false; + if (!object.Equals(EndOpen, other.EndOpen)) return false; + if (StartKeyTypeCase != other.StartKeyTypeCase) return false; + if (EndKeyTypeCase != other.EndKeyTypeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) hash ^= StartClosed.GetHashCode(); + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) hash ^= StartOpen.GetHashCode(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) hash ^= EndClosed.GetHashCode(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) hash ^= EndOpen.GetHashCode(); + hash ^= (int) startKeyTypeCase_; + hash ^= (int) endKeyTypeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) { + output.WriteRawTag(10); + output.WriteMessage(StartClosed); + } + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) { + output.WriteRawTag(18); + output.WriteMessage(StartOpen); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) { + output.WriteRawTag(26); + output.WriteMessage(EndClosed); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) { + output.WriteRawTag(34); + output.WriteMessage(EndOpen); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) { + output.WriteRawTag(10); + output.WriteMessage(StartClosed); + } + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) { + output.WriteRawTag(18); + output.WriteMessage(StartOpen); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) { + output.WriteRawTag(26); + output.WriteMessage(EndClosed); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) { + output.WriteRawTag(34); + output.WriteMessage(EndOpen); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StartClosed); + } + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StartOpen); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EndClosed); + } + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EndOpen); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(KeyRange other) { + if (other == null) { + return; + } + switch (other.StartKeyTypeCase) { + case StartKeyTypeOneofCase.StartClosed: + if (StartClosed == null) { + StartClosed = new global::Google.Protobuf.WellKnownTypes.ListValue(); + } + StartClosed.MergeFrom(other.StartClosed); + break; + case StartKeyTypeOneofCase.StartOpen: + if (StartOpen == null) { + StartOpen = new global::Google.Protobuf.WellKnownTypes.ListValue(); + } + StartOpen.MergeFrom(other.StartOpen); + break; + } + + switch (other.EndKeyTypeCase) { + case EndKeyTypeOneofCase.EndClosed: + if (EndClosed == null) { + EndClosed = new global::Google.Protobuf.WellKnownTypes.ListValue(); + } + EndClosed.MergeFrom(other.EndClosed); + break; + case EndKeyTypeOneofCase.EndOpen: + if (EndOpen == null) { + EndOpen = new global::Google.Protobuf.WellKnownTypes.ListValue(); + } + EndOpen.MergeFrom(other.EndOpen); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) { + subBuilder.MergeFrom(StartClosed); + } + input.ReadMessage(subBuilder); + StartClosed = subBuilder; + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) { + subBuilder.MergeFrom(StartOpen); + } + input.ReadMessage(subBuilder); + StartOpen = subBuilder; + break; + } + case 26: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) { + subBuilder.MergeFrom(EndClosed); + } + input.ReadMessage(subBuilder); + EndClosed = subBuilder; + break; + } + case 34: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) { + subBuilder.MergeFrom(EndOpen); + } + input.ReadMessage(subBuilder); + EndOpen = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartClosed) { + subBuilder.MergeFrom(StartClosed); + } + input.ReadMessage(subBuilder); + StartClosed = subBuilder; + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (startKeyTypeCase_ == StartKeyTypeOneofCase.StartOpen) { + subBuilder.MergeFrom(StartOpen); + } + input.ReadMessage(subBuilder); + StartOpen = subBuilder; + break; + } + case 26: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndClosed) { + subBuilder.MergeFrom(EndClosed); + } + input.ReadMessage(subBuilder); + EndClosed = subBuilder; + break; + } + case 34: { + global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue(); + if (endKeyTypeCase_ == EndKeyTypeOneofCase.EndOpen) { + subBuilder.MergeFrom(EndOpen); + } + input.ReadMessage(subBuilder); + EndOpen = subBuilder; + break; + } + } + } + } + #endif + + } + + /// + /// `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All + /// the keys are expected to be in the same table or index. The keys need + /// not be sorted in any particular way. + /// + /// If the same key is specified multiple times in the set (for example + /// if two ranges, two keys, or a key and a range overlap), Cloud Spanner + /// behaves as if the key were only specified once. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeySet : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeySet()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.KeysReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeySet() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeySet(KeySet other) : this() { + keys_ = other.keys_.Clone(); + ranges_ = other.ranges_.Clone(); + all_ = other.all_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public KeySet Clone() { + return new KeySet(this); + } + + /// Field number for the "keys" field. + public const int KeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keys_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.ListValue.Parser); + private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + /// + /// A list of specific keys. Entries in `keys` should have exactly as + /// many elements as there are columns in the primary or index key + /// with which this `KeySet` is used. Individual key values are + /// encoded as described [here][google.spanner.v1.TypeCode]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Keys { + get { return keys_; } + } + + /// Field number for the "ranges" field. + public const int RangesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_ranges_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Spanner.V1.KeyRange.Parser); + private readonly pbc::RepeatedField ranges_ = new pbc::RepeatedField(); + /// + /// A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about + /// key range specifications. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Ranges { + get { return ranges_; } + } + + /// Field number for the "all" field. + public const int AllFieldNumber = 3; + private bool all_; + /// + /// For convenience `all` can be set to `true` to indicate that this + /// `KeySet` matches all keys in the table or index. Note that any keys + /// specified in `keys` or `ranges` are only yielded once. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool All { + get { return all_; } + set { + all_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as KeySet); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(KeySet other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keys_.Equals(other.keys_)) return false; + if(!ranges_.Equals(other.ranges_)) return false; + if (All != other.All) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= keys_.GetHashCode(); + hash ^= ranges_.GetHashCode(); + if (All != false) hash ^= All.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keys_.WriteTo(output, _repeated_keys_codec); + ranges_.WriteTo(output, _repeated_ranges_codec); + if (All != false) { + output.WriteRawTag(24); + output.WriteBool(All); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keys_.WriteTo(ref output, _repeated_keys_codec); + ranges_.WriteTo(ref output, _repeated_ranges_codec); + if (All != false) { + output.WriteRawTag(24); + output.WriteBool(All); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += keys_.CalculateSize(_repeated_keys_codec); + size += ranges_.CalculateSize(_repeated_ranges_codec); + if (All != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(KeySet other) { + if (other == null) { + return; + } + keys_.Add(other.keys_); + ranges_.Add(other.ranges_); + if (other.All != false) { + All = other.All; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + keys_.AddEntriesFrom(input, _repeated_keys_codec); + break; + } + case 18: { + ranges_.AddEntriesFrom(input, _repeated_ranges_codec); + break; + } + case 24: { + All = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + keys_.AddEntriesFrom(ref input, _repeated_keys_codec); + break; + } + case 18: { + ranges_.AddEntriesFrom(ref input, _repeated_ranges_codec); + break; + } + case 24: { + All = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Mutation.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Mutation.g.cs new file mode 100755 index 000000000000..584338805df5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Mutation.g.cs @@ -0,0 +1,1066 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/mutation.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/mutation.proto + public static partial class MutationReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/mutation.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MutationReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiBnb29nbGUvc3Bhbm5lci92MS9tdXRhdGlvbi5wcm90bxIRZ29vZ2xlLnNw", + "YW5uZXIudjEaH2dvb2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aHGdv", + "b2dsZS9wcm90b2J1Zi9zdHJ1Y3QucHJvdG8aHGdvb2dsZS9zcGFubmVyL3Yx", + "L2tleXMucHJvdG8i1QMKCE11dGF0aW9uEjMKBmluc2VydBgBIAEoCzIhLmdv", + "b2dsZS5zcGFubmVyLnYxLk11dGF0aW9uLldyaXRlSAASMwoGdXBkYXRlGAIg", + "ASgLMiEuZ29vZ2xlLnNwYW5uZXIudjEuTXV0YXRpb24uV3JpdGVIABI9ChBp", + "bnNlcnRfb3JfdXBkYXRlGAMgASgLMiEuZ29vZ2xlLnNwYW5uZXIudjEuTXV0", + "YXRpb24uV3JpdGVIABI0CgdyZXBsYWNlGAQgASgLMiEuZ29vZ2xlLnNwYW5u", + "ZXIudjEuTXV0YXRpb24uV3JpdGVIABI0CgZkZWxldGUYBSABKAsyIi5nb29n", + "bGUuc3Bhbm5lci52MS5NdXRhdGlvbi5EZWxldGVIABpYCgVXcml0ZRISCgV0", + "YWJsZRgBIAEoCUID4EECEg8KB2NvbHVtbnMYAiADKAkSKgoGdmFsdWVzGAMg", + "AygLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZRpNCgZEZWxldGUSEgoF", + "dGFibGUYASABKAlCA+BBAhIvCgdrZXlfc2V0GAIgASgLMhkuZ29vZ2xlLnNw", + "YW5uZXIudjEuS2V5U2V0QgPgQQJCCwoJb3BlcmF0aW9uQrABChVjb20uZ29v", + "Z2xlLnNwYW5uZXIudjFCDU11dGF0aW9uUHJvdG9QAVo1Y2xvdWQuZ29vZ2xl", + "LmNvbS9nby9zcGFubmVyL2FwaXYxL3NwYW5uZXJwYjtzcGFubmVycGKqAhdH", + "b29nbGUuQ2xvdWQuU3Bhbm5lci5WMcoCF0dvb2dsZVxDbG91ZFxTcGFubmVy", + "XFYx6gIaR29vZ2xlOjpDbG91ZDo6U3Bhbm5lcjo6VjFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Cloud.Spanner.V1.KeysReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Mutation), global::Google.Cloud.Spanner.V1.Mutation.Parser, new[]{ "Insert", "Update", "InsertOrUpdate", "Replace", "Delete" }, new[]{ "Operation" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Mutation.Types.Write), global::Google.Cloud.Spanner.V1.Mutation.Types.Write.Parser, new[]{ "Table", "Columns", "Values" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Mutation.Types.Delete), global::Google.Cloud.Spanner.V1.Mutation.Types.Delete.Parser, new[]{ "Table", "KeySet" }, null, null, null, null)}) + })); + } + #endregion + + } + #region Messages + /// + /// A modification to one or more Cloud Spanner rows. Mutations can be + /// applied to a Cloud Spanner database by sending them in a + /// [Commit][google.spanner.v1.Spanner.Commit] call. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Mutation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mutation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.MutationReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Mutation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Mutation(Mutation other) : this() { + switch (other.OperationCase) { + case OperationOneofCase.Insert: + Insert = other.Insert.Clone(); + break; + case OperationOneofCase.Update: + Update = other.Update.Clone(); + break; + case OperationOneofCase.InsertOrUpdate: + InsertOrUpdate = other.InsertOrUpdate.Clone(); + break; + case OperationOneofCase.Replace: + Replace = other.Replace.Clone(); + break; + case OperationOneofCase.Delete: + Delete = other.Delete.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Mutation Clone() { + return new Mutation(this); + } + + /// Field number for the "insert" field. + public const int InsertFieldNumber = 1; + /// + /// Insert new rows in a table. If any of the rows already exist, + /// the write or transaction fails with error `ALREADY_EXISTS`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Mutation.Types.Write Insert { + get { return operationCase_ == OperationOneofCase.Insert ? (global::Google.Cloud.Spanner.V1.Mutation.Types.Write) operation_ : null; } + set { + operation_ = value; + operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Insert; + } + } + + /// Field number for the "update" field. + public const int UpdateFieldNumber = 2; + /// + /// Update existing rows in a table. If any of the rows does not + /// already exist, the transaction fails with error `NOT_FOUND`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Mutation.Types.Write Update { + get { return operationCase_ == OperationOneofCase.Update ? (global::Google.Cloud.Spanner.V1.Mutation.Types.Write) operation_ : null; } + set { + operation_ = value; + operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Update; + } + } + + /// Field number for the "insert_or_update" field. + public const int InsertOrUpdateFieldNumber = 3; + /// + /// Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then + /// its column values are overwritten with the ones provided. Any + /// column values not explicitly written are preserved. + /// + /// When using [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as when using [insert][google.spanner.v1.Mutation.insert], all `NOT + /// NULL` columns in the table must be given a value. This holds true + /// even when the row already exists and will therefore actually be updated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Mutation.Types.Write InsertOrUpdate { + get { return operationCase_ == OperationOneofCase.InsertOrUpdate ? (global::Google.Cloud.Spanner.V1.Mutation.Types.Write) operation_ : null; } + set { + operation_ = value; + operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.InsertOrUpdate; + } + } + + /// Field number for the "replace" field. + public const int ReplaceFieldNumber = 4; + /// + /// Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is + /// deleted, and the column values provided are inserted + /// instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not + /// explicitly written become `NULL`. + /// + /// In an interleaved table, if you create the child table with the + /// `ON DELETE CASCADE` annotation, then replacing a parent row + /// also deletes the child rows. Otherwise, you must delete the + /// child rows before you replace the parent row. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Mutation.Types.Write Replace { + get { return operationCase_ == OperationOneofCase.Replace ? (global::Google.Cloud.Spanner.V1.Mutation.Types.Write) operation_ : null; } + set { + operation_ = value; + operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Replace; + } + } + + /// Field number for the "delete" field. + public const int DeleteFieldNumber = 5; + /// + /// Delete rows from a table. Succeeds whether or not the named + /// rows were present. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Mutation.Types.Delete Delete { + get { return operationCase_ == OperationOneofCase.Delete ? (global::Google.Cloud.Spanner.V1.Mutation.Types.Delete) operation_ : null; } + set { + operation_ = value; + operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Delete; + } + } + + private object operation_; + /// Enum of possible cases for the "operation" oneof. + public enum OperationOneofCase { + None = 0, + Insert = 1, + Update = 2, + InsertOrUpdate = 3, + Replace = 4, + Delete = 5, + } + private OperationOneofCase operationCase_ = OperationOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationOneofCase OperationCase { + get { return operationCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearOperation() { + operationCase_ = OperationOneofCase.None; + operation_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Mutation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Mutation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Insert, other.Insert)) return false; + if (!object.Equals(Update, other.Update)) return false; + if (!object.Equals(InsertOrUpdate, other.InsertOrUpdate)) return false; + if (!object.Equals(Replace, other.Replace)) return false; + if (!object.Equals(Delete, other.Delete)) return false; + if (OperationCase != other.OperationCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (operationCase_ == OperationOneofCase.Insert) hash ^= Insert.GetHashCode(); + if (operationCase_ == OperationOneofCase.Update) hash ^= Update.GetHashCode(); + if (operationCase_ == OperationOneofCase.InsertOrUpdate) hash ^= InsertOrUpdate.GetHashCode(); + if (operationCase_ == OperationOneofCase.Replace) hash ^= Replace.GetHashCode(); + if (operationCase_ == OperationOneofCase.Delete) hash ^= Delete.GetHashCode(); + hash ^= (int) operationCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (operationCase_ == OperationOneofCase.Insert) { + output.WriteRawTag(10); + output.WriteMessage(Insert); + } + if (operationCase_ == OperationOneofCase.Update) { + output.WriteRawTag(18); + output.WriteMessage(Update); + } + if (operationCase_ == OperationOneofCase.InsertOrUpdate) { + output.WriteRawTag(26); + output.WriteMessage(InsertOrUpdate); + } + if (operationCase_ == OperationOneofCase.Replace) { + output.WriteRawTag(34); + output.WriteMessage(Replace); + } + if (operationCase_ == OperationOneofCase.Delete) { + output.WriteRawTag(42); + output.WriteMessage(Delete); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (operationCase_ == OperationOneofCase.Insert) { + output.WriteRawTag(10); + output.WriteMessage(Insert); + } + if (operationCase_ == OperationOneofCase.Update) { + output.WriteRawTag(18); + output.WriteMessage(Update); + } + if (operationCase_ == OperationOneofCase.InsertOrUpdate) { + output.WriteRawTag(26); + output.WriteMessage(InsertOrUpdate); + } + if (operationCase_ == OperationOneofCase.Replace) { + output.WriteRawTag(34); + output.WriteMessage(Replace); + } + if (operationCase_ == OperationOneofCase.Delete) { + output.WriteRawTag(42); + output.WriteMessage(Delete); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (operationCase_ == OperationOneofCase.Insert) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Insert); + } + if (operationCase_ == OperationOneofCase.Update) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Update); + } + if (operationCase_ == OperationOneofCase.InsertOrUpdate) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(InsertOrUpdate); + } + if (operationCase_ == OperationOneofCase.Replace) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Replace); + } + if (operationCase_ == OperationOneofCase.Delete) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Delete); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Mutation other) { + if (other == null) { + return; + } + switch (other.OperationCase) { + case OperationOneofCase.Insert: + if (Insert == null) { + Insert = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + } + Insert.MergeFrom(other.Insert); + break; + case OperationOneofCase.Update: + if (Update == null) { + Update = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + } + Update.MergeFrom(other.Update); + break; + case OperationOneofCase.InsertOrUpdate: + if (InsertOrUpdate == null) { + InsertOrUpdate = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + } + InsertOrUpdate.MergeFrom(other.InsertOrUpdate); + break; + case OperationOneofCase.Replace: + if (Replace == null) { + Replace = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + } + Replace.MergeFrom(other.Replace); + break; + case OperationOneofCase.Delete: + if (Delete == null) { + Delete = new global::Google.Cloud.Spanner.V1.Mutation.Types.Delete(); + } + Delete.MergeFrom(other.Delete); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Insert) { + subBuilder.MergeFrom(Insert); + } + input.ReadMessage(subBuilder); + Insert = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Update) { + subBuilder.MergeFrom(Update); + } + input.ReadMessage(subBuilder); + Update = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.InsertOrUpdate) { + subBuilder.MergeFrom(InsertOrUpdate); + } + input.ReadMessage(subBuilder); + InsertOrUpdate = subBuilder; + break; + } + case 34: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Replace) { + subBuilder.MergeFrom(Replace); + } + input.ReadMessage(subBuilder); + Replace = subBuilder; + break; + } + case 42: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Delete subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Delete(); + if (operationCase_ == OperationOneofCase.Delete) { + subBuilder.MergeFrom(Delete); + } + input.ReadMessage(subBuilder); + Delete = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Insert) { + subBuilder.MergeFrom(Insert); + } + input.ReadMessage(subBuilder); + Insert = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Update) { + subBuilder.MergeFrom(Update); + } + input.ReadMessage(subBuilder); + Update = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.InsertOrUpdate) { + subBuilder.MergeFrom(InsertOrUpdate); + } + input.ReadMessage(subBuilder); + InsertOrUpdate = subBuilder; + break; + } + case 34: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Write subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Write(); + if (operationCase_ == OperationOneofCase.Replace) { + subBuilder.MergeFrom(Replace); + } + input.ReadMessage(subBuilder); + Replace = subBuilder; + break; + } + case 42: { + global::Google.Cloud.Spanner.V1.Mutation.Types.Delete subBuilder = new global::Google.Cloud.Spanner.V1.Mutation.Types.Delete(); + if (operationCase_ == OperationOneofCase.Delete) { + subBuilder.MergeFrom(Delete); + } + input.ReadMessage(subBuilder); + Delete = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Mutation message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and + /// [replace][google.spanner.v1.Mutation.replace] operations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Write : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Write()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.Mutation.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Write() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Write(Write other) : this() { + table_ = other.table_; + columns_ = other.columns_.Clone(); + values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Write Clone() { + return new Write(this); + } + + /// Field number for the "table" field. + public const int TableFieldNumber = 1; + private string table_ = ""; + /// + /// Required. The table whose rows will be written. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Table { + get { return table_; } + set { + table_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "columns" field. + public const int ColumnsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_columns_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField columns_ = new pbc::RepeatedField(); + /// + /// The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written. + /// + /// The list of columns must contain enough columns to allow + /// Cloud Spanner to derive values for all primary key columns in the + /// row(s) to be modified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Columns { + get { return columns_; } + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.ListValue.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + /// + /// The values to be written. `values` can contain more than one + /// list of values. If it does, then multiple rows are written, one + /// for each entry in `values`. Each list in `values` must have + /// exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns] + /// above. Sending multiple lists is equivalent to sending multiple + /// `Mutation`s, each containing one `values` entry and repeating + /// [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are + /// encoded as described [here][google.spanner.v1.TypeCode]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Values { + get { return values_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Write); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Write other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Table != other.Table) return false; + if(!columns_.Equals(other.columns_)) return false; + if(!values_.Equals(other.values_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Table.Length != 0) hash ^= Table.GetHashCode(); + hash ^= columns_.GetHashCode(); + hash ^= values_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Table.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Table); + } + columns_.WriteTo(output, _repeated_columns_codec); + values_.WriteTo(output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Table.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Table); + } + columns_.WriteTo(ref output, _repeated_columns_codec); + values_.WriteTo(ref output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Table.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Table); + } + size += columns_.CalculateSize(_repeated_columns_codec); + size += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Write other) { + if (other == null) { + return; + } + if (other.Table.Length != 0) { + Table = other.Table; + } + columns_.Add(other.columns_); + values_.Add(other.values_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Table = input.ReadString(); + break; + } + case 18: { + columns_.AddEntriesFrom(input, _repeated_columns_codec); + break; + } + case 26: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Table = input.ReadString(); + break; + } + case 18: { + columns_.AddEntriesFrom(ref input, _repeated_columns_codec); + break; + } + case 26: { + values_.AddEntriesFrom(ref input, _repeated_values_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Arguments to [delete][google.spanner.v1.Mutation.delete] operations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Delete : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Delete()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.Mutation.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Delete() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Delete(Delete other) : this() { + table_ = other.table_; + keySet_ = other.keySet_ != null ? other.keySet_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Delete Clone() { + return new Delete(this); + } + + /// Field number for the "table" field. + public const int TableFieldNumber = 1; + private string table_ = ""; + /// + /// Required. The table whose rows will be deleted. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Table { + get { return table_; } + set { + table_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "key_set" field. + public const int KeySetFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.KeySet keySet_; + /// + /// Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete. The + /// primary keys must be specified in the order in which they appear in the + /// `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL + /// statement used to create the table). + /// Delete is idempotent. The transaction will succeed even if some or all + /// rows do not exist. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.KeySet KeySet { + get { return keySet_; } + set { + keySet_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Delete); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Delete other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Table != other.Table) return false; + if (!object.Equals(KeySet, other.KeySet)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Table.Length != 0) hash ^= Table.GetHashCode(); + if (keySet_ != null) hash ^= KeySet.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Table.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Table); + } + if (keySet_ != null) { + output.WriteRawTag(18); + output.WriteMessage(KeySet); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Table.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Table); + } + if (keySet_ != null) { + output.WriteRawTag(18); + output.WriteMessage(KeySet); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Table.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Table); + } + if (keySet_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(KeySet); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Delete other) { + if (other == null) { + return; + } + if (other.Table.Length != 0) { + Table = other.Table; + } + if (other.keySet_ != null) { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + KeySet.MergeFrom(other.KeySet); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Table = input.ReadString(); + break; + } + case 18: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Table = input.ReadString(); + break; + } + case 18: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/PackageApiMetadata.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/PackageApiMetadata.g.cs new file mode 100755 index 000000000000..1e848352347c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/PackageApiMetadata.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gpr = Google.Protobuf.Reflection; +using scg = System.Collections.Generic; + +namespace Google.Cloud.Spanner.V1 +{ + /// Static class to provide common access to package-wide API metadata. + internal static class PackageApiMetadata + { + /// The for services in this package. + internal static gaxgrpc::ApiMetadata ApiMetadata { get; } = new gaxgrpc::ApiMetadata("Google.Cloud.Spanner.V1", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return CommitResponseReflection.Descriptor; + yield return KeysReflection.Descriptor; + yield return MutationReflection.Descriptor; + yield return QueryPlanReflection.Descriptor; + yield return ResultSetReflection.Descriptor; + yield return SpannerReflection.Descriptor; + yield return TransactionReflection.Descriptor; + yield return TypeReflection.Descriptor; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/QueryPlan.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/QueryPlan.g.cs new file mode 100755 index 000000000000..20417e37824e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/QueryPlan.g.cs @@ -0,0 +1,1267 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/query_plan.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/query_plan.proto + public static partial class QueryPlanReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/query_plan.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static QueryPlanReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJnb29nbGUvc3Bhbm5lci92MS9xdWVyeV9wbGFuLnByb3RvEhFnb29nbGUu", + "c3Bhbm5lci52MRocZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90byL4BAoI", + "UGxhbk5vZGUSDQoFaW5kZXgYASABKAUSLgoEa2luZBgCIAEoDjIgLmdvb2ds", + "ZS5zcGFubmVyLnYxLlBsYW5Ob2RlLktpbmQSFAoMZGlzcGxheV9uYW1lGAMg", + "ASgJEjoKC2NoaWxkX2xpbmtzGAQgAygLMiUuZ29vZ2xlLnNwYW5uZXIudjEu", + "UGxhbk5vZGUuQ2hpbGRMaW5rEk0KFHNob3J0X3JlcHJlc2VudGF0aW9uGAUg", + "ASgLMi8uZ29vZ2xlLnNwYW5uZXIudjEuUGxhbk5vZGUuU2hvcnRSZXByZXNl", + "bnRhdGlvbhIpCghtZXRhZGF0YRgGIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5T", + "dHJ1Y3QSMAoPZXhlY3V0aW9uX3N0YXRzGAcgASgLMhcuZ29vZ2xlLnByb3Rv", + "YnVmLlN0cnVjdBpACglDaGlsZExpbmsSEwoLY2hpbGRfaW5kZXgYASABKAUS", + "DAoEdHlwZRgCIAEoCRIQCgh2YXJpYWJsZRgDIAEoCRqyAQoTU2hvcnRSZXBy", + "ZXNlbnRhdGlvbhITCgtkZXNjcmlwdGlvbhgBIAEoCRJTCgpzdWJxdWVyaWVz", + "GAIgAygLMj8uZ29vZ2xlLnNwYW5uZXIudjEuUGxhbk5vZGUuU2hvcnRSZXBy", + "ZXNlbnRhdGlvbi5TdWJxdWVyaWVzRW50cnkaMQoPU3VicXVlcmllc0VudHJ5", + "EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoBToCOAEiOAoES2luZBIUChBL", + "SU5EX1VOU1BFQ0lGSUVEEAASDgoKUkVMQVRJT05BTBABEgoKBlNDQUxBUhAC", + "IjwKCVF1ZXJ5UGxhbhIvCgpwbGFuX25vZGVzGAEgAygLMhsuZ29vZ2xlLnNw", + "YW5uZXIudjEuUGxhbk5vZGVCsQEKFWNvbS5nb29nbGUuc3Bhbm5lci52MUIO", + "UXVlcnlQbGFuUHJvdG9QAVo1Y2xvdWQuZ29vZ2xlLmNvbS9nby9zcGFubmVy", + "L2FwaXYxL3NwYW5uZXJwYjtzcGFubmVycGKqAhdHb29nbGUuQ2xvdWQuU3Bh", + "bm5lci5WMcoCF0dvb2dsZVxDbG91ZFxTcGFubmVyXFYx6gIaR29vZ2xlOjpD", + "bG91ZDo6U3Bhbm5lcjo6VjFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PlanNode), global::Google.Cloud.Spanner.V1.PlanNode.Parser, new[]{ "Index", "Kind", "DisplayName", "ChildLinks", "ShortRepresentation", "Metadata", "ExecutionStats" }, null, new[]{ typeof(global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PlanNode.Types.ChildLink), global::Google.Cloud.Spanner.V1.PlanNode.Types.ChildLink.Parser, new[]{ "ChildIndex", "Type", "Variable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation), global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation.Parser, new[]{ "Description", "Subqueries" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.QueryPlan), global::Google.Cloud.Spanner.V1.QueryPlan.Parser, new[]{ "PlanNodes" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Node information for nodes appearing in a [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PlanNode : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlanNode()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.QueryPlanReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlanNode() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlanNode(PlanNode other) : this() { + index_ = other.index_; + kind_ = other.kind_; + displayName_ = other.displayName_; + childLinks_ = other.childLinks_.Clone(); + shortRepresentation_ = other.shortRepresentation_ != null ? other.shortRepresentation_.Clone() : null; + metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null; + executionStats_ = other.executionStats_ != null ? other.executionStats_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlanNode Clone() { + return new PlanNode(this); + } + + /// Field number for the "index" field. + public const int IndexFieldNumber = 1; + private int index_; + /// + /// The `PlanNode`'s index in [node list][google.spanner.v1.QueryPlan.plan_nodes]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Index { + get { return index_; } + set { + index_ = value; + } + } + + /// Field number for the "kind" field. + public const int KindFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind kind_ = global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified; + /// + /// Used to determine the type of node. May be needed for visualizing + /// different kinds of nodes differently. For example, If the node is a + /// [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a condensed representation + /// which can be used to directly embed a description of the node in its + /// parent. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind Kind { + get { return kind_; } + set { + kind_ = value; + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 3; + private string displayName_ = ""; + /// + /// The display name for the node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "child_links" field. + public const int ChildLinksFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_childLinks_codec + = pb::FieldCodec.ForMessage(34, global::Google.Cloud.Spanner.V1.PlanNode.Types.ChildLink.Parser); + private readonly pbc::RepeatedField childLinks_ = new pbc::RepeatedField(); + /// + /// List of child node `index`es and their relationship to this parent. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ChildLinks { + get { return childLinks_; } + } + + /// Field number for the "short_representation" field. + public const int ShortRepresentationFieldNumber = 5; + private global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation shortRepresentation_; + /// + /// Condensed representation for [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation ShortRepresentation { + get { return shortRepresentation_; } + set { + shortRepresentation_ = value; + } + } + + /// Field number for the "metadata" field. + public const int MetadataFieldNumber = 6; + private global::Google.Protobuf.WellKnownTypes.Struct metadata_; + /// + /// Attributes relevant to the node contained in a group of key-value pairs. + /// For example, a Parameter Reference node could have the following + /// information in its metadata: + /// + /// { + /// "parameter_reference": "param1", + /// "parameter_type": "array" + /// } + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Metadata { + get { return metadata_; } + set { + metadata_ = value; + } + } + + /// Field number for the "execution_stats" field. + public const int ExecutionStatsFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Struct executionStats_; + /// + /// The execution statistics associated with the node, contained in a group of + /// key-value pairs. Only present if the plan was returned as a result of a + /// profile query. For example, number of executions, number of rows/time per + /// execution etc. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct ExecutionStats { + get { return executionStats_; } + set { + executionStats_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PlanNode); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PlanNode other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Index != other.Index) return false; + if (Kind != other.Kind) return false; + if (DisplayName != other.DisplayName) return false; + if(!childLinks_.Equals(other.childLinks_)) return false; + if (!object.Equals(ShortRepresentation, other.ShortRepresentation)) return false; + if (!object.Equals(Metadata, other.Metadata)) return false; + if (!object.Equals(ExecutionStats, other.ExecutionStats)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Index != 0) hash ^= Index.GetHashCode(); + if (Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified) hash ^= Kind.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + hash ^= childLinks_.GetHashCode(); + if (shortRepresentation_ != null) hash ^= ShortRepresentation.GetHashCode(); + if (metadata_ != null) hash ^= Metadata.GetHashCode(); + if (executionStats_ != null) hash ^= ExecutionStats.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Index != 0) { + output.WriteRawTag(8); + output.WriteInt32(Index); + } + if (Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) Kind); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DisplayName); + } + childLinks_.WriteTo(output, _repeated_childLinks_codec); + if (shortRepresentation_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ShortRepresentation); + } + if (metadata_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Metadata); + } + if (executionStats_ != null) { + output.WriteRawTag(58); + output.WriteMessage(ExecutionStats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Index != 0) { + output.WriteRawTag(8); + output.WriteInt32(Index); + } + if (Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) Kind); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DisplayName); + } + childLinks_.WriteTo(ref output, _repeated_childLinks_codec); + if (shortRepresentation_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ShortRepresentation); + } + if (metadata_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Metadata); + } + if (executionStats_ != null) { + output.WriteRawTag(58); + output.WriteMessage(ExecutionStats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Index != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index); + } + if (Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + size += childLinks_.CalculateSize(_repeated_childLinks_codec); + if (shortRepresentation_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ShortRepresentation); + } + if (metadata_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata); + } + if (executionStats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExecutionStats); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PlanNode other) { + if (other == null) { + return; + } + if (other.Index != 0) { + Index = other.Index; + } + if (other.Kind != global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind.Unspecified) { + Kind = other.Kind; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + childLinks_.Add(other.childLinks_); + if (other.shortRepresentation_ != null) { + if (shortRepresentation_ == null) { + ShortRepresentation = new global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation(); + } + ShortRepresentation.MergeFrom(other.ShortRepresentation); + } + if (other.metadata_ != null) { + if (metadata_ == null) { + Metadata = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Metadata.MergeFrom(other.Metadata); + } + if (other.executionStats_ != null) { + if (executionStats_ == null) { + ExecutionStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + ExecutionStats.MergeFrom(other.ExecutionStats); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Index = input.ReadInt32(); + break; + } + case 16: { + Kind = (global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind) input.ReadEnum(); + break; + } + case 26: { + DisplayName = input.ReadString(); + break; + } + case 34: { + childLinks_.AddEntriesFrom(input, _repeated_childLinks_codec); + break; + } + case 42: { + if (shortRepresentation_ == null) { + ShortRepresentation = new global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation(); + } + input.ReadMessage(ShortRepresentation); + break; + } + case 50: { + if (metadata_ == null) { + Metadata = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Metadata); + break; + } + case 58: { + if (executionStats_ == null) { + ExecutionStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(ExecutionStats); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Index = input.ReadInt32(); + break; + } + case 16: { + Kind = (global::Google.Cloud.Spanner.V1.PlanNode.Types.Kind) input.ReadEnum(); + break; + } + case 26: { + DisplayName = input.ReadString(); + break; + } + case 34: { + childLinks_.AddEntriesFrom(ref input, _repeated_childLinks_codec); + break; + } + case 42: { + if (shortRepresentation_ == null) { + ShortRepresentation = new global::Google.Cloud.Spanner.V1.PlanNode.Types.ShortRepresentation(); + } + input.ReadMessage(ShortRepresentation); + break; + } + case 50: { + if (metadata_ == null) { + Metadata = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Metadata); + break; + } + case 58: { + if (executionStats_ == null) { + ExecutionStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(ExecutionStats); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the PlanNode message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between the two different kinds of + /// nodes that can appear in a query plan. + /// + public enum Kind { + /// + /// Not specified. + /// + [pbr::OriginalName("KIND_UNSPECIFIED")] Unspecified = 0, + /// + /// Denotes a Relational operator node in the expression tree. Relational + /// operators represent iterative processing of rows during query execution. + /// For example, a `TableScan` operation that reads rows from a table. + /// + [pbr::OriginalName("RELATIONAL")] Relational = 1, + /// + /// Denotes a Scalar node in the expression tree. Scalar nodes represent + /// non-iterable entities in the query plan. For example, constants or + /// arithmetic operators appearing inside predicate expressions or references + /// to column names. + /// + [pbr::OriginalName("SCALAR")] Scalar = 2, + } + + /// + /// Metadata associated with a parent-child relationship appearing in a + /// [PlanNode][google.spanner.v1.PlanNode]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChildLink : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChildLink()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.PlanNode.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChildLink() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChildLink(ChildLink other) : this() { + childIndex_ = other.childIndex_; + type_ = other.type_; + variable_ = other.variable_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChildLink Clone() { + return new ChildLink(this); + } + + /// Field number for the "child_index" field. + public const int ChildIndexFieldNumber = 1; + private int childIndex_; + /// + /// The node to which the link points. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ChildIndex { + get { return childIndex_; } + set { + childIndex_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private string type_ = ""; + /// + /// The type of the link. For example, in Hash Joins this could be used to + /// distinguish between the build child and the probe child, or in the case + /// of the child being an output variable, to represent the tag associated + /// with the output variable. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "variable" field. + public const int VariableFieldNumber = 3; + private string variable_ = ""; + /// + /// Only present if the child node is [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds + /// to an output variable of the parent node. The field carries the name of + /// the output variable. + /// For example, a `TableScan` operator that reads rows from a table will + /// have child links to the `SCALAR` nodes representing the output variables + /// created for each column that is read by the operator. The corresponding + /// `variable` fields will be set to the variable names assigned to the + /// columns. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Variable { + get { return variable_; } + set { + variable_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChildLink); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChildLink other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ChildIndex != other.ChildIndex) return false; + if (Type != other.Type) return false; + if (Variable != other.Variable) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ChildIndex != 0) hash ^= ChildIndex.GetHashCode(); + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (Variable.Length != 0) hash ^= Variable.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ChildIndex != 0) { + output.WriteRawTag(8); + output.WriteInt32(ChildIndex); + } + if (Type.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Type); + } + if (Variable.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Variable); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ChildIndex != 0) { + output.WriteRawTag(8); + output.WriteInt32(ChildIndex); + } + if (Type.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Type); + } + if (Variable.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Variable); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ChildIndex != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ChildIndex); + } + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (Variable.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Variable); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChildLink other) { + if (other == null) { + return; + } + if (other.ChildIndex != 0) { + ChildIndex = other.ChildIndex; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.Variable.Length != 0) { + Variable = other.Variable; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ChildIndex = input.ReadInt32(); + break; + } + case 18: { + Type = input.ReadString(); + break; + } + case 26: { + Variable = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ChildIndex = input.ReadInt32(); + break; + } + case 18: { + Type = input.ReadString(); + break; + } + case 26: { + Variable = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Condensed representation of a node and its subtree. Only present for + /// `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShortRepresentation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShortRepresentation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.PlanNode.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShortRepresentation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShortRepresentation(ShortRepresentation other) : this() { + description_ = other.description_; + subqueries_ = other.subqueries_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShortRepresentation Clone() { + return new ShortRepresentation(this); + } + + /// Field number for the "description" field. + public const int DescriptionFieldNumber = 1; + private string description_ = ""; + /// + /// A string representation of the expression subtree rooted at this node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Description { + get { return description_; } + set { + description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "subqueries" field. + public const int SubqueriesFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_subqueries_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForInt32(16, 0), 18); + private readonly pbc::MapField subqueries_ = new pbc::MapField(); + /// + /// A mapping of (subquery variable name) -> (subquery node id) for cases + /// where the `description` string of this node references a `SCALAR` + /// subquery contained in the expression subtree rooted at this node. The + /// referenced `SCALAR` subquery may not necessarily be a direct child of + /// this node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Subqueries { + get { return subqueries_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShortRepresentation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShortRepresentation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Description != other.Description) return false; + if (!Subqueries.Equals(other.Subqueries)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Description.Length != 0) hash ^= Description.GetHashCode(); + hash ^= Subqueries.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Description.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Description); + } + subqueries_.WriteTo(output, _map_subqueries_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Description.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Description); + } + subqueries_.WriteTo(ref output, _map_subqueries_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Description.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + } + size += subqueries_.CalculateSize(_map_subqueries_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShortRepresentation other) { + if (other == null) { + return; + } + if (other.Description.Length != 0) { + Description = other.Description; + } + subqueries_.MergeFrom(other.subqueries_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Description = input.ReadString(); + break; + } + case 18: { + subqueries_.AddEntriesFrom(input, _map_subqueries_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Description = input.ReadString(); + break; + } + case 18: { + subqueries_.AddEntriesFrom(ref input, _map_subqueries_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Contains an ordered list of nodes appearing in the query plan. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class QueryPlan : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryPlan()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.QueryPlanReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryPlan() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryPlan(QueryPlan other) : this() { + planNodes_ = other.planNodes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryPlan Clone() { + return new QueryPlan(this); + } + + /// Field number for the "plan_nodes" field. + public const int PlanNodesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_planNodes_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.PlanNode.Parser); + private readonly pbc::RepeatedField planNodes_ = new pbc::RepeatedField(); + /// + /// The nodes in the query plan. Plan nodes are returned in pre-order starting + /// with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` corresponds to its index in + /// `plan_nodes`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PlanNodes { + get { return planNodes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as QueryPlan); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(QueryPlan other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!planNodes_.Equals(other.planNodes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= planNodes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + planNodes_.WriteTo(output, _repeated_planNodes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + planNodes_.WriteTo(ref output, _repeated_planNodes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += planNodes_.CalculateSize(_repeated_planNodes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(QueryPlan other) { + if (other == null) { + return; + } + planNodes_.Add(other.planNodes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + planNodes_.AddEntriesFrom(input, _repeated_planNodes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + planNodes_.AddEntriesFrom(ref input, _repeated_planNodes_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ResultSet.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ResultSet.g.cs new file mode 100755 index 000000000000..d451b569e53e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ResultSet.g.cs @@ -0,0 +1,1539 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/result_set.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/result_set.proto + public static partial class ResultSetReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/result_set.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ResultSetReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJnb29nbGUvc3Bhbm5lci92MS9yZXN1bHRfc2V0LnByb3RvEhFnb29nbGUu", + "c3Bhbm5lci52MRocZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90bxoiZ29v", + "Z2xlL3NwYW5uZXIvdjEvcXVlcnlfcGxhbi5wcm90bxojZ29vZ2xlL3NwYW5u", + "ZXIvdjEvdHJhbnNhY3Rpb24ucHJvdG8aHGdvb2dsZS9zcGFubmVyL3YxL3R5", + "cGUucHJvdG8inwEKCVJlc3VsdFNldBI2CghtZXRhZGF0YRgBIAEoCzIkLmdv", + "b2dsZS5zcGFubmVyLnYxLlJlc3VsdFNldE1ldGFkYXRhEigKBHJvd3MYAiAD", + "KAsyGi5nb29nbGUucHJvdG9idWYuTGlzdFZhbHVlEjAKBXN0YXRzGAMgASgL", + "MiEuZ29vZ2xlLnNwYW5uZXIudjEuUmVzdWx0U2V0U3RhdHMi0QEKEFBhcnRp", + "YWxSZXN1bHRTZXQSNgoIbWV0YWRhdGEYASABKAsyJC5nb29nbGUuc3Bhbm5l", + "ci52MS5SZXN1bHRTZXRNZXRhZGF0YRImCgZ2YWx1ZXMYAiADKAsyFi5nb29n", + "bGUucHJvdG9idWYuVmFsdWUSFQoNY2h1bmtlZF92YWx1ZRgDIAEoCBIUCgxy", + "ZXN1bWVfdG9rZW4YBCABKAwSMAoFc3RhdHMYBSABKAsyIS5nb29nbGUuc3Bh", + "bm5lci52MS5SZXN1bHRTZXRTdGF0cyK3AQoRUmVzdWx0U2V0TWV0YWRhdGES", + "LwoIcm93X3R5cGUYASABKAsyHS5nb29nbGUuc3Bhbm5lci52MS5TdHJ1Y3RU", + "eXBlEjMKC3RyYW5zYWN0aW9uGAIgASgLMh4uZ29vZ2xlLnNwYW5uZXIudjEu", + "VHJhbnNhY3Rpb24SPAoVdW5kZWNsYXJlZF9wYXJhbWV0ZXJzGAMgASgLMh0u", + "Z29vZ2xlLnNwYW5uZXIudjEuU3RydWN0VHlwZSK5AQoOUmVzdWx0U2V0U3Rh", + "dHMSMAoKcXVlcnlfcGxhbhgBIAEoCzIcLmdvb2dsZS5zcGFubmVyLnYxLlF1", + "ZXJ5UGxhbhIsCgtxdWVyeV9zdGF0cxgCIAEoCzIXLmdvb2dsZS5wcm90b2J1", + "Zi5TdHJ1Y3QSGQoPcm93X2NvdW50X2V4YWN0GAMgASgDSAASHwoVcm93X2Nv", + "dW50X2xvd2VyX2JvdW5kGAQgASgDSABCCwoJcm93X2NvdW50QrQBChVjb20u", + "Z29vZ2xlLnNwYW5uZXIudjFCDlJlc3VsdFNldFByb3RvUAFaNWNsb3VkLmdv", + "b2dsZS5jb20vZ28vc3Bhbm5lci9hcGl2MS9zcGFubmVycGI7c3Bhbm5lcnBi", + "+AEBqgIXR29vZ2xlLkNsb3VkLlNwYW5uZXIuVjHKAhdHb29nbGVcQ2xvdWRc", + "U3Bhbm5lclxWMeoCGkdvb2dsZTo6Q2xvdWQ6OlNwYW5uZXI6OlYxYgZwcm90", + "bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Cloud.Spanner.V1.QueryPlanReflection.Descriptor, global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor, global::Google.Cloud.Spanner.V1.TypeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSet), global::Google.Cloud.Spanner.V1.ResultSet.Parser, new[]{ "Metadata", "Rows", "Stats" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartialResultSet), global::Google.Cloud.Spanner.V1.PartialResultSet.Parser, new[]{ "Metadata", "Values", "ChunkedValue", "ResumeToken", "Stats" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSetMetadata), global::Google.Cloud.Spanner.V1.ResultSetMetadata.Parser, new[]{ "RowType", "Transaction", "UndeclaredParameters" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSetStats), global::Google.Cloud.Spanner.V1.ResultSetStats.Parser, new[]{ "QueryPlan", "QueryStats", "RowCountExact", "RowCountLowerBound" }, new[]{ "RowCount" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Results from [Read][google.spanner.v1.Spanner.Read] or + /// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResultSet : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResultSet()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ResultSetReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSet() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSet(ResultSet other) : this() { + metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null; + rows_ = other.rows_.Clone(); + stats_ = other.stats_ != null ? other.stats_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSet Clone() { + return new ResultSet(this); + } + + /// Field number for the "metadata" field. + public const int MetadataFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.ResultSetMetadata metadata_; + /// + /// Metadata about the result set, such as row type information. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ResultSetMetadata Metadata { + get { return metadata_; } + set { + metadata_ = value; + } + } + + /// Field number for the "rows" field. + public const int RowsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_rows_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.ListValue.Parser); + private readonly pbc::RepeatedField rows_ = new pbc::RepeatedField(); + /// + /// Each element in `rows` is a row whose format is defined by + /// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element + /// in each row matches the ith field in + /// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are + /// encoded based on type as described + /// [here][google.spanner.v1.TypeCode]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Rows { + get { return rows_; } + } + + /// Field number for the "stats" field. + public const int StatsFieldNumber = 3; + private global::Google.Cloud.Spanner.V1.ResultSetStats stats_; + /// + /// Query plan and execution statistics for the SQL statement that + /// produced this result set. These can be requested by setting + /// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. + /// DML statements always produce stats containing the number of rows + /// modified, unless executed using the + /// [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. + /// Other fields may or may not be populated, based on the + /// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ResultSetStats Stats { + get { return stats_; } + set { + stats_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResultSet); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResultSet other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Metadata, other.Metadata)) return false; + if(!rows_.Equals(other.rows_)) return false; + if (!object.Equals(Stats, other.Stats)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (metadata_ != null) hash ^= Metadata.GetHashCode(); + hash ^= rows_.GetHashCode(); + if (stats_ != null) hash ^= Stats.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + rows_.WriteTo(output, _repeated_rows_codec); + if (stats_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Stats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + rows_.WriteTo(ref output, _repeated_rows_codec); + if (stats_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Stats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (metadata_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata); + } + size += rows_.CalculateSize(_repeated_rows_codec); + if (stats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResultSet other) { + if (other == null) { + return; + } + if (other.metadata_ != null) { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + Metadata.MergeFrom(other.Metadata); + } + rows_.Add(other.rows_); + if (other.stats_ != null) { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + Stats.MergeFrom(other.Stats); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + rows_.AddEntriesFrom(input, _repeated_rows_codec); + break; + } + case 26: { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + input.ReadMessage(Stats); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + rows_.AddEntriesFrom(ref input, _repeated_rows_codec); + break; + } + case 26: { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + input.ReadMessage(Stats); + break; + } + } + } + } + #endif + + } + + /// + /// Partial results from a streaming read or SQL query. Streaming reads and + /// SQL queries better tolerate large result sets, large rows, and large + /// values, but are a little trickier to consume. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartialResultSet : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartialResultSet()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ResultSetReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartialResultSet() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartialResultSet(PartialResultSet other) : this() { + metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null; + values_ = other.values_.Clone(); + chunkedValue_ = other.chunkedValue_; + resumeToken_ = other.resumeToken_; + stats_ = other.stats_ != null ? other.stats_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartialResultSet Clone() { + return new PartialResultSet(this); + } + + /// Field number for the "metadata" field. + public const int MetadataFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.ResultSetMetadata metadata_; + /// + /// Metadata about the result set, such as row type information. + /// Only present in the first response. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ResultSetMetadata Metadata { + get { return metadata_; } + set { + metadata_ = value; + } + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + /// + /// A streamed result set consists of a stream of values, which might + /// be split into many `PartialResultSet` messages to accommodate + /// large rows and/or large values. Every N complete values defines a + /// row, where N is equal to the number of entries in + /// [metadata.row_type.fields][google.spanner.v1.StructType.fields]. + /// + /// Most values are encoded based on type as described + /// [here][google.spanner.v1.TypeCode]. + /// + /// It is possible that the last value in values is "chunked", + /// meaning that the rest of the value is sent in subsequent + /// `PartialResultSet`(s). This is denoted by the [chunked_value][google.spanner.v1.PartialResultSet.chunked_value] + /// field. Two or more chunked values can be merged to form a + /// complete value as follows: + /// + /// * `bool/number/null`: cannot be chunked + /// * `string`: concatenate the strings + /// * `list`: concatenate the lists. If the last element in a list is a + /// `string`, `list`, or `object`, merge it with the first element in + /// the next list by applying these rules recursively. + /// * `object`: concatenate the (field name, field value) pairs. If a + /// field name is duplicated, then apply these rules recursively + /// to merge the field values. + /// + /// Some examples of merging: + /// + /// # Strings are concatenated. + /// "foo", "bar" => "foobar" + /// + /// # Lists of non-strings are concatenated. + /// [2, 3], [4] => [2, 3, 4] + /// + /// # Lists are concatenated, but the last and first elements are merged + /// # because they are strings. + /// ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + /// + /// # Lists are concatenated, but the last and first elements are merged + /// # because they are lists. Recursively, the last and first elements + /// # of the inner lists are merged because they are strings. + /// ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + /// + /// # Non-overlapping object fields are combined. + /// {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + /// + /// # Overlapping object fields are merged. + /// {"a": "1"}, {"a": "2"} => {"a": "12"} + /// + /// # Examples of merging objects containing lists of strings. + /// {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + /// + /// For a more complete example, suppose a streaming SQL query is + /// yielding a result set whose rows contain a single string + /// field. The following `PartialResultSet`s might be yielded: + /// + /// { + /// "metadata": { ... } + /// "values": ["Hello", "W"] + /// "chunked_value": true + /// "resume_token": "Af65..." + /// } + /// { + /// "values": ["orl"] + /// "chunked_value": true + /// "resume_token": "Bqp2..." + /// } + /// { + /// "values": ["d"] + /// "resume_token": "Zx1B..." + /// } + /// + /// This sequence of `PartialResultSet`s encodes two rows, one + /// containing the field value `"Hello"`, and a second containing the + /// field value `"World" = "W" + "orl" + "d"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Values { + get { return values_; } + } + + /// Field number for the "chunked_value" field. + public const int ChunkedValueFieldNumber = 3; + private bool chunkedValue_; + /// + /// If true, then the final value in [values][google.spanner.v1.PartialResultSet.values] is chunked, and must + /// be combined with more values from subsequent `PartialResultSet`s + /// to obtain a complete field value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ChunkedValue { + get { return chunkedValue_; } + set { + chunkedValue_ = value; + } + } + + /// Field number for the "resume_token" field. + public const int ResumeTokenFieldNumber = 4; + private pb::ByteString resumeToken_ = pb::ByteString.Empty; + /// + /// Streaming calls might be interrupted for a variety of reasons, such + /// as TCP connection loss. If this occurs, the stream of results can + /// be resumed by re-sending the original request and including + /// `resume_token`. Note that executing any other transaction in the + /// same session invalidates the token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ResumeToken { + get { return resumeToken_; } + set { + resumeToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "stats" field. + public const int StatsFieldNumber = 5; + private global::Google.Cloud.Spanner.V1.ResultSetStats stats_; + /// + /// Query plan and execution statistics for the statement that produced this + /// streaming result set. These can be requested by setting + /// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] and are sent + /// only once with the last response in the stream. + /// This field will also be present in the last response for DML + /// statements. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ResultSetStats Stats { + get { return stats_; } + set { + stats_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartialResultSet); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartialResultSet other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Metadata, other.Metadata)) return false; + if(!values_.Equals(other.values_)) return false; + if (ChunkedValue != other.ChunkedValue) return false; + if (ResumeToken != other.ResumeToken) return false; + if (!object.Equals(Stats, other.Stats)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (metadata_ != null) hash ^= Metadata.GetHashCode(); + hash ^= values_.GetHashCode(); + if (ChunkedValue != false) hash ^= ChunkedValue.GetHashCode(); + if (ResumeToken.Length != 0) hash ^= ResumeToken.GetHashCode(); + if (stats_ != null) hash ^= Stats.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + values_.WriteTo(output, _repeated_values_codec); + if (ChunkedValue != false) { + output.WriteRawTag(24); + output.WriteBool(ChunkedValue); + } + if (ResumeToken.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ResumeToken); + } + if (stats_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Stats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (metadata_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Metadata); + } + values_.WriteTo(ref output, _repeated_values_codec); + if (ChunkedValue != false) { + output.WriteRawTag(24); + output.WriteBool(ChunkedValue); + } + if (ResumeToken.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ResumeToken); + } + if (stats_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Stats); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (metadata_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata); + } + size += values_.CalculateSize(_repeated_values_codec); + if (ChunkedValue != false) { + size += 1 + 1; + } + if (ResumeToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ResumeToken); + } + if (stats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartialResultSet other) { + if (other == null) { + return; + } + if (other.metadata_ != null) { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + Metadata.MergeFrom(other.Metadata); + } + values_.Add(other.values_); + if (other.ChunkedValue != false) { + ChunkedValue = other.ChunkedValue; + } + if (other.ResumeToken.Length != 0) { + ResumeToken = other.ResumeToken; + } + if (other.stats_ != null) { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + Stats.MergeFrom(other.Stats); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + case 24: { + ChunkedValue = input.ReadBool(); + break; + } + case 34: { + ResumeToken = input.ReadBytes(); + break; + } + case 42: { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + input.ReadMessage(Stats); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (metadata_ == null) { + Metadata = new global::Google.Cloud.Spanner.V1.ResultSetMetadata(); + } + input.ReadMessage(Metadata); + break; + } + case 18: { + values_.AddEntriesFrom(ref input, _repeated_values_codec); + break; + } + case 24: { + ChunkedValue = input.ReadBool(); + break; + } + case 34: { + ResumeToken = input.ReadBytes(); + break; + } + case 42: { + if (stats_ == null) { + Stats = new global::Google.Cloud.Spanner.V1.ResultSetStats(); + } + input.ReadMessage(Stats); + break; + } + } + } + } + #endif + + } + + /// + /// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResultSetMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResultSetMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ResultSetReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetMetadata(ResultSetMetadata other) : this() { + rowType_ = other.rowType_ != null ? other.rowType_.Clone() : null; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + undeclaredParameters_ = other.undeclaredParameters_ != null ? other.undeclaredParameters_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetMetadata Clone() { + return new ResultSetMetadata(this); + } + + /// Field number for the "row_type" field. + public const int RowTypeFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.StructType rowType_; + /// + /// Indicates the field names and types for the rows in the result + /// set. For example, a SQL query like `"SELECT UserId, UserName FROM + /// Users"` could return a `row_type` value like: + /// + /// "fields": [ + /// { "name": "UserId", "type": { "code": "INT64" } }, + /// { "name": "UserName", "type": { "code": "STRING" } }, + /// ] + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.StructType RowType { + get { return rowType_; } + set { + rowType_ = value; + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Transaction transaction_; + /// + /// If the read or SQL query began a transaction as a side-effect, the + /// information about the new transaction is yielded here. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Transaction Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "undeclared_parameters" field. + public const int UndeclaredParametersFieldNumber = 3; + private global::Google.Cloud.Spanner.V1.StructType undeclaredParameters_; + /// + /// A SQL query can be parameterized. In PLAN mode, these parameters can be + /// undeclared. This indicates the field names and types for those undeclared + /// parameters in the SQL query. For example, a SQL query like `"SELECT * FROM + /// Users where UserId = @userId and UserName = @userName "` could return a + /// `undeclared_parameters` value like: + /// + /// "fields": [ + /// { "name": "UserId", "type": { "code": "INT64" } }, + /// { "name": "UserName", "type": { "code": "STRING" } }, + /// ] + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.StructType UndeclaredParameters { + get { return undeclaredParameters_; } + set { + undeclaredParameters_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResultSetMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResultSetMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(RowType, other.RowType)) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if (!object.Equals(UndeclaredParameters, other.UndeclaredParameters)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (rowType_ != null) hash ^= RowType.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (undeclaredParameters_ != null) hash ^= UndeclaredParameters.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (rowType_ != null) { + output.WriteRawTag(10); + output.WriteMessage(RowType); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (undeclaredParameters_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UndeclaredParameters); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (rowType_ != null) { + output.WriteRawTag(10); + output.WriteMessage(RowType); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (undeclaredParameters_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UndeclaredParameters); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (rowType_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RowType); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (undeclaredParameters_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UndeclaredParameters); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResultSetMetadata other) { + if (other == null) { + return; + } + if (other.rowType_ != null) { + if (rowType_ == null) { + RowType = new global::Google.Cloud.Spanner.V1.StructType(); + } + RowType.MergeFrom(other.RowType); + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + Transaction.MergeFrom(other.Transaction); + } + if (other.undeclaredParameters_ != null) { + if (undeclaredParameters_ == null) { + UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType(); + } + UndeclaredParameters.MergeFrom(other.UndeclaredParameters); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (rowType_ == null) { + RowType = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(RowType); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + if (undeclaredParameters_ == null) { + UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(UndeclaredParameters); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (rowType_ == null) { + RowType = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(RowType); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + if (undeclaredParameters_ == null) { + UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(UndeclaredParameters); + break; + } + } + } + } + #endif + + } + + /// + /// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResultSetStats : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResultSetStats()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ResultSetReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetStats() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetStats(ResultSetStats other) : this() { + queryPlan_ = other.queryPlan_ != null ? other.queryPlan_.Clone() : null; + queryStats_ = other.queryStats_ != null ? other.queryStats_.Clone() : null; + switch (other.RowCountCase) { + case RowCountOneofCase.RowCountExact: + RowCountExact = other.RowCountExact; + break; + case RowCountOneofCase.RowCountLowerBound: + RowCountLowerBound = other.RowCountLowerBound; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResultSetStats Clone() { + return new ResultSetStats(this); + } + + /// Field number for the "query_plan" field. + public const int QueryPlanFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.QueryPlan queryPlan_; + /// + /// [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this result. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.QueryPlan QueryPlan { + get { return queryPlan_; } + set { + queryPlan_ = value; + } + } + + /// Field number for the "query_stats" field. + public const int QueryStatsFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Struct queryStats_; + /// + /// Aggregated statistics from the execution of the query. Only present when + /// the query is profiled. For example, a query could return the statistics as + /// follows: + /// + /// { + /// "rows_returned": "3", + /// "elapsed_time": "1.22 secs", + /// "cpu_time": "1.19 secs" + /// } + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct QueryStats { + get { return queryStats_; } + set { + queryStats_ = value; + } + } + + /// Field number for the "row_count_exact" field. + public const int RowCountExactFieldNumber = 3; + /// + /// Standard DML returns an exact count of rows that were modified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RowCountExact { + get { return HasRowCountExact ? (long) rowCount_ : 0L; } + set { + rowCount_ = value; + rowCountCase_ = RowCountOneofCase.RowCountExact; + } + } + /// Gets whether the "row_count_exact" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRowCountExact { + get { return rowCountCase_ == RowCountOneofCase.RowCountExact; } + } + /// Clears the value of the oneof if it's currently set to "row_count_exact" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRowCountExact() { + if (HasRowCountExact) { + ClearRowCount(); + } + } + + /// Field number for the "row_count_lower_bound" field. + public const int RowCountLowerBoundFieldNumber = 4; + /// + /// Partitioned DML does not offer exactly-once semantics, so it + /// returns a lower bound of the rows modified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RowCountLowerBound { + get { return HasRowCountLowerBound ? (long) rowCount_ : 0L; } + set { + rowCount_ = value; + rowCountCase_ = RowCountOneofCase.RowCountLowerBound; + } + } + /// Gets whether the "row_count_lower_bound" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRowCountLowerBound { + get { return rowCountCase_ == RowCountOneofCase.RowCountLowerBound; } + } + /// Clears the value of the oneof if it's currently set to "row_count_lower_bound" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRowCountLowerBound() { + if (HasRowCountLowerBound) { + ClearRowCount(); + } + } + + private object rowCount_; + /// Enum of possible cases for the "row_count" oneof. + public enum RowCountOneofCase { + None = 0, + RowCountExact = 3, + RowCountLowerBound = 4, + } + private RowCountOneofCase rowCountCase_ = RowCountOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RowCountOneofCase RowCountCase { + get { return rowCountCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRowCount() { + rowCountCase_ = RowCountOneofCase.None; + rowCount_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResultSetStats); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResultSetStats other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(QueryPlan, other.QueryPlan)) return false; + if (!object.Equals(QueryStats, other.QueryStats)) return false; + if (RowCountExact != other.RowCountExact) return false; + if (RowCountLowerBound != other.RowCountLowerBound) return false; + if (RowCountCase != other.RowCountCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (queryPlan_ != null) hash ^= QueryPlan.GetHashCode(); + if (queryStats_ != null) hash ^= QueryStats.GetHashCode(); + if (HasRowCountExact) hash ^= RowCountExact.GetHashCode(); + if (HasRowCountLowerBound) hash ^= RowCountLowerBound.GetHashCode(); + hash ^= (int) rowCountCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (queryPlan_ != null) { + output.WriteRawTag(10); + output.WriteMessage(QueryPlan); + } + if (queryStats_ != null) { + output.WriteRawTag(18); + output.WriteMessage(QueryStats); + } + if (HasRowCountExact) { + output.WriteRawTag(24); + output.WriteInt64(RowCountExact); + } + if (HasRowCountLowerBound) { + output.WriteRawTag(32); + output.WriteInt64(RowCountLowerBound); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (queryPlan_ != null) { + output.WriteRawTag(10); + output.WriteMessage(QueryPlan); + } + if (queryStats_ != null) { + output.WriteRawTag(18); + output.WriteMessage(QueryStats); + } + if (HasRowCountExact) { + output.WriteRawTag(24); + output.WriteInt64(RowCountExact); + } + if (HasRowCountLowerBound) { + output.WriteRawTag(32); + output.WriteInt64(RowCountLowerBound); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (queryPlan_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryPlan); + } + if (queryStats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryStats); + } + if (HasRowCountExact) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RowCountExact); + } + if (HasRowCountLowerBound) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RowCountLowerBound); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResultSetStats other) { + if (other == null) { + return; + } + if (other.queryPlan_ != null) { + if (queryPlan_ == null) { + QueryPlan = new global::Google.Cloud.Spanner.V1.QueryPlan(); + } + QueryPlan.MergeFrom(other.QueryPlan); + } + if (other.queryStats_ != null) { + if (queryStats_ == null) { + QueryStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + QueryStats.MergeFrom(other.QueryStats); + } + switch (other.RowCountCase) { + case RowCountOneofCase.RowCountExact: + RowCountExact = other.RowCountExact; + break; + case RowCountOneofCase.RowCountLowerBound: + RowCountLowerBound = other.RowCountLowerBound; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (queryPlan_ == null) { + QueryPlan = new global::Google.Cloud.Spanner.V1.QueryPlan(); + } + input.ReadMessage(QueryPlan); + break; + } + case 18: { + if (queryStats_ == null) { + QueryStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(QueryStats); + break; + } + case 24: { + RowCountExact = input.ReadInt64(); + break; + } + case 32: { + RowCountLowerBound = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (queryPlan_ == null) { + QueryPlan = new global::Google.Cloud.Spanner.V1.QueryPlan(); + } + input.ReadMessage(QueryPlan); + break; + } + case 18: { + if (queryStats_ == null) { + QueryStats = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(QueryStats); + break; + } + case 24: { + RowCountExact = input.ReadInt64(); + break; + } + case 32: { + RowCountLowerBound = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ServiceCollectionExtensions.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ServiceCollectionExtensions.g.cs new file mode 100755 index 000000000000..638116f16081 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ServiceCollectionExtensions.g.cs @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gcsv = Google.Cloud.Spanner.V1; +using gpr = Google.Protobuf.Reflection; +using sys = System; +using scg = System.Collections.Generic; + +namespace Microsoft.Extensions.DependencyInjection +{ + /// Static class to provide extension methods to configure API clients. + public static partial class ServiceCollectionExtensions + { + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddSpannerClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcsv::SpannerClientBuilder builder = new gcsv::SpannerClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddSpannerClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcsv::SpannerClientBuilder builder = new gcsv::SpannerClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Spanner.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Spanner.g.cs new file mode 100755 index 000000000000..e3a3adc49b04 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Spanner.g.cs @@ -0,0 +1,9905 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/spanner.proto + public static partial class SpannerReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/spanner.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SpannerReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch9nb29nbGUvc3Bhbm5lci92MS9zcGFubmVyLnByb3RvEhFnb29nbGUuc3Bh", + "bm5lci52MRonZ29vZ2xlL3NwYW5uZXIvdjEvY29tbWl0X3Jlc3BvbnNlLnBy", + "b3RvGhxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvGhdnb29nbGUvYXBp", + "L2NsaWVudC5wcm90bxofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90", + "bxoZZ29vZ2xlL2FwaS9yZXNvdXJjZS5wcm90bxoeZ29vZ2xlL3Byb3RvYnVm", + "L2R1cmF0aW9uLnByb3RvGhtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8a", + "HGdvb2dsZS9wcm90b2J1Zi9zdHJ1Y3QucHJvdG8aH2dvb2dsZS9wcm90b2J1", + "Zi90aW1lc3RhbXAucHJvdG8aF2dvb2dsZS9ycGMvc3RhdHVzLnByb3RvGhxn", + "b29nbGUvc3Bhbm5lci92MS9rZXlzLnByb3RvGiBnb29nbGUvc3Bhbm5lci92", + "MS9tdXRhdGlvbi5wcm90bxoiZ29vZ2xlL3NwYW5uZXIvdjEvcmVzdWx0X3Nl", + "dC5wcm90bxojZ29vZ2xlL3NwYW5uZXIvdjEvdHJhbnNhY3Rpb24ucHJvdG8a", + "HGdvb2dsZS9zcGFubmVyL3YxL3R5cGUucHJvdG8igwEKFENyZWF0ZVNlc3Np", + "b25SZXF1ZXN0EjkKCGRhdGFiYXNlGAEgASgJQifgQQL6QSEKH3NwYW5uZXIu", + "Z29vZ2xlYXBpcy5jb20vRGF0YWJhc2USMAoHc2Vzc2lvbhgCIAEoCzIaLmdv", + "b2dsZS5zcGFubmVyLnYxLlNlc3Npb25CA+BBAiKpAQoaQmF0Y2hDcmVhdGVT", + "ZXNzaW9uc1JlcXVlc3QSOQoIZGF0YWJhc2UYASABKAlCJ+BBAvpBIQofc3Bh", + "bm5lci5nb29nbGVhcGlzLmNvbS9EYXRhYmFzZRI0ChBzZXNzaW9uX3RlbXBs", + "YXRlGAIgASgLMhouZ29vZ2xlLnNwYW5uZXIudjEuU2Vzc2lvbhIaCg1zZXNz", + "aW9uX2NvdW50GAMgASgFQgPgQQIiSgobQmF0Y2hDcmVhdGVTZXNzaW9uc1Jl", + "c3BvbnNlEisKB3Nlc3Npb24YASADKAsyGi5nb29nbGUuc3Bhbm5lci52MS5T", + "ZXNzaW9uIqMDCgdTZXNzaW9uEhEKBG5hbWUYASABKAlCA+BBAxI2CgZsYWJl", + "bHMYAiADKAsyJi5nb29nbGUuc3Bhbm5lci52MS5TZXNzaW9uLkxhYmVsc0Vu", + "dHJ5EjQKC2NyZWF0ZV90aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp", + "bWVzdGFtcEID4EEDEkIKGWFwcHJveGltYXRlX2xhc3RfdXNlX3RpbWUYBCAB", + "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSFAoMY3JlYXRv", + "cl9yb2xlGAUgASgJEhgKC211bHRpcGxleGVkGAYgASgIQgPgQQEaLQoLTGFi", + "ZWxzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ATp06kFx", + "Ch5zcGFubmVyLmdvb2dsZWFwaXMuY29tL1Nlc3Npb24ST3Byb2plY3RzL3tw", + "cm9qZWN0fS9pbnN0YW5jZXMve2luc3RhbmNlfS9kYXRhYmFzZXMve2RhdGFi", + "YXNlfS9zZXNzaW9ucy97c2Vzc2lvbn0iSQoRR2V0U2Vzc2lvblJlcXVlc3QS", + "NAoEbmFtZRgBIAEoCUIm4EEC+kEgCh5zcGFubmVyLmdvb2dsZWFwaXMuY29t", + "L1Nlc3Npb24ihwEKE0xpc3RTZXNzaW9uc1JlcXVlc3QSOQoIZGF0YWJhc2UY", + "ASABKAlCJ+BBAvpBIQofc3Bhbm5lci5nb29nbGVhcGlzLmNvbS9EYXRhYmFz", + "ZRIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZm", + "aWx0ZXIYBCABKAkiXQoUTGlzdFNlc3Npb25zUmVzcG9uc2USLAoIc2Vzc2lv", + "bnMYASADKAsyGi5nb29nbGUuc3Bhbm5lci52MS5TZXNzaW9uEhcKD25leHRf", + "cGFnZV90b2tlbhgCIAEoCSJMChREZWxldGVTZXNzaW9uUmVxdWVzdBI0CgRu", + "YW1lGAEgASgJQibgQQL6QSAKHnNwYW5uZXIuZ29vZ2xlYXBpcy5jb20vU2Vz", + "c2lvbiLcAQoOUmVxdWVzdE9wdGlvbnMSPAoIcHJpb3JpdHkYASABKA4yKi5n", + "b29nbGUuc3Bhbm5lci52MS5SZXF1ZXN0T3B0aW9ucy5Qcmlvcml0eRITCgty", + "ZXF1ZXN0X3RhZxgCIAEoCRIXCg90cmFuc2FjdGlvbl90YWcYAyABKAkiXgoI", + "UHJpb3JpdHkSGAoUUFJJT1JJVFlfVU5TUEVDSUZJRUQQABIQCgxQUklPUklU", + "WV9MT1cQARITCg9QUklPUklUWV9NRURJVU0QAhIRCg1QUklPUklUWV9ISUdI", + "EAMi6gQKE0RpcmVjdGVkUmVhZE9wdGlvbnMSUgoQaW5jbHVkZV9yZXBsaWNh", + "cxgBIAEoCzI2Lmdvb2dsZS5zcGFubmVyLnYxLkRpcmVjdGVkUmVhZE9wdGlv", + "bnMuSW5jbHVkZVJlcGxpY2FzSAASUgoQZXhjbHVkZV9yZXBsaWNhcxgCIAEo", + "CzI2Lmdvb2dsZS5zcGFubmVyLnYxLkRpcmVjdGVkUmVhZE9wdGlvbnMuRXhj", + "bHVkZVJlcGxpY2FzSAAarQEKEFJlcGxpY2FTZWxlY3Rpb24SEAoIbG9jYXRp", + "b24YASABKAkSSgoEdHlwZRgCIAEoDjI8Lmdvb2dsZS5zcGFubmVyLnYxLkRp", + "cmVjdGVkUmVhZE9wdGlvbnMuUmVwbGljYVNlbGVjdGlvbi5UeXBlIjsKBFR5", + "cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEg4KClJFQURfV1JJVEUQARINCglS", + "RUFEX09OTFkQAhqGAQoPSW5jbHVkZVJlcGxpY2FzElMKEnJlcGxpY2Ffc2Vs", + "ZWN0aW9ucxgBIAMoCzI3Lmdvb2dsZS5zcGFubmVyLnYxLkRpcmVjdGVkUmVh", + "ZE9wdGlvbnMuUmVwbGljYVNlbGVjdGlvbhIeChZhdXRvX2ZhaWxvdmVyX2Rp", + "c2FibGVkGAIgASgIGmYKD0V4Y2x1ZGVSZXBsaWNhcxJTChJyZXBsaWNhX3Nl", + "bGVjdGlvbnMYASADKAsyNy5nb29nbGUuc3Bhbm5lci52MS5EaXJlY3RlZFJl", + "YWRPcHRpb25zLlJlcGxpY2FTZWxlY3Rpb25CCgoIcmVwbGljYXMixwYKEUV4", + "ZWN1dGVTcWxSZXF1ZXN0EjcKB3Nlc3Npb24YASABKAlCJuBBAvpBIAoec3Bh", + "bm5lci5nb29nbGVhcGlzLmNvbS9TZXNzaW9uEjsKC3RyYW5zYWN0aW9uGAIg", + "ASgLMiYuZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb25TZWxlY3RvchIQ", + "CgNzcWwYAyABKAlCA+BBAhInCgZwYXJhbXMYBCABKAsyFy5nb29nbGUucHJv", + "dG9idWYuU3RydWN0EkkKC3BhcmFtX3R5cGVzGAUgAygLMjQuZ29vZ2xlLnNw", + "YW5uZXIudjEuRXhlY3V0ZVNxbFJlcXVlc3QuUGFyYW1UeXBlc0VudHJ5EhQK", + "DHJlc3VtZV90b2tlbhgGIAEoDBJCCgpxdWVyeV9tb2RlGAcgASgOMi4uZ29v", + "Z2xlLnNwYW5uZXIudjEuRXhlY3V0ZVNxbFJlcXVlc3QuUXVlcnlNb2RlEhcK", + "D3BhcnRpdGlvbl90b2tlbhgIIAEoDBINCgVzZXFubxgJIAEoAxJICg1xdWVy", + "eV9vcHRpb25zGAogASgLMjEuZ29vZ2xlLnNwYW5uZXIudjEuRXhlY3V0ZVNx", + "bFJlcXVlc3QuUXVlcnlPcHRpb25zEjoKD3JlcXVlc3Rfb3B0aW9ucxgLIAEo", + "CzIhLmdvb2dsZS5zcGFubmVyLnYxLlJlcXVlc3RPcHRpb25zEkUKFWRpcmVj", + "dGVkX3JlYWRfb3B0aW9ucxgPIAEoCzImLmdvb2dsZS5zcGFubmVyLnYxLkRp", + "cmVjdGVkUmVhZE9wdGlvbnMSGgoSZGF0YV9ib29zdF9lbmFibGVkGBAgASgI", + "Gk8KDFF1ZXJ5T3B0aW9ucxIZChFvcHRpbWl6ZXJfdmVyc2lvbhgBIAEoCRIk", + "ChxvcHRpbWl6ZXJfc3RhdGlzdGljc19wYWNrYWdlGAIgASgJGkoKD1BhcmFt", + "VHlwZXNFbnRyeRILCgNrZXkYASABKAkSJgoFdmFsdWUYAiABKAsyFy5nb29n", + "bGUuc3Bhbm5lci52MS5UeXBlOgI4ASIuCglRdWVyeU1vZGUSCgoGTk9STUFM", + "EAASCAoEUExBThABEgsKB1BST0ZJTEUQAiKgBAoWRXhlY3V0ZUJhdGNoRG1s", + "UmVxdWVzdBI3CgdzZXNzaW9uGAEgASgJQibgQQL6QSAKHnNwYW5uZXIuZ29v", + "Z2xlYXBpcy5jb20vU2Vzc2lvbhJACgt0cmFuc2FjdGlvbhgCIAEoCzImLmdv", + "b2dsZS5zcGFubmVyLnYxLlRyYW5zYWN0aW9uU2VsZWN0b3JCA+BBAhJMCgpz", + "dGF0ZW1lbnRzGAMgAygLMjMuZ29vZ2xlLnNwYW5uZXIudjEuRXhlY3V0ZUJh", + "dGNoRG1sUmVxdWVzdC5TdGF0ZW1lbnRCA+BBAhISCgVzZXFubxgEIAEoA0ID", + "4EECEjoKD3JlcXVlc3Rfb3B0aW9ucxgFIAEoCzIhLmdvb2dsZS5zcGFubmVy", + "LnYxLlJlcXVlc3RPcHRpb25zGuwBCglTdGF0ZW1lbnQSEAoDc3FsGAEgASgJ", + "QgPgQQISJwoGcGFyYW1zGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVj", + "dBJYCgtwYXJhbV90eXBlcxgDIAMoCzJDLmdvb2dsZS5zcGFubmVyLnYxLkV4", + "ZWN1dGVCYXRjaERtbFJlcXVlc3QuU3RhdGVtZW50LlBhcmFtVHlwZXNFbnRy", + "eRpKCg9QYXJhbVR5cGVzRW50cnkSCwoDa2V5GAEgASgJEiYKBXZhbHVlGAIg", + "ASgLMhcuZ29vZ2xlLnNwYW5uZXIudjEuVHlwZToCOAEicAoXRXhlY3V0ZUJh", + "dGNoRG1sUmVzcG9uc2USMQoLcmVzdWx0X3NldHMYASADKAsyHC5nb29nbGUu", + "c3Bhbm5lci52MS5SZXN1bHRTZXQSIgoGc3RhdHVzGAIgASgLMhIuZ29vZ2xl", + "LnJwYy5TdGF0dXMiSAoQUGFydGl0aW9uT3B0aW9ucxIcChRwYXJ0aXRpb25f", + "c2l6ZV9ieXRlcxgBIAEoAxIWCg5tYXhfcGFydGl0aW9ucxgCIAEoAyKjAwoV", + "UGFydGl0aW9uUXVlcnlSZXF1ZXN0EjcKB3Nlc3Npb24YASABKAlCJuBBAvpB", + "IAoec3Bhbm5lci5nb29nbGVhcGlzLmNvbS9TZXNzaW9uEjsKC3RyYW5zYWN0", + "aW9uGAIgASgLMiYuZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb25TZWxl", + "Y3RvchIQCgNzcWwYAyABKAlCA+BBAhInCgZwYXJhbXMYBCABKAsyFy5nb29n", + "bGUucHJvdG9idWYuU3RydWN0Ek0KC3BhcmFtX3R5cGVzGAUgAygLMjguZ29v", + "Z2xlLnNwYW5uZXIudjEuUGFydGl0aW9uUXVlcnlSZXF1ZXN0LlBhcmFtVHlw", + "ZXNFbnRyeRI+ChFwYXJ0aXRpb25fb3B0aW9ucxgGIAEoCzIjLmdvb2dsZS5z", + "cGFubmVyLnYxLlBhcnRpdGlvbk9wdGlvbnMaSgoPUGFyYW1UeXBlc0VudHJ5", + "EgsKA2tleRgBIAEoCRImCgV2YWx1ZRgCIAEoCzIXLmdvb2dsZS5zcGFubmVy", + "LnYxLlR5cGU6AjgBIrECChRQYXJ0aXRpb25SZWFkUmVxdWVzdBI3CgdzZXNz", + "aW9uGAEgASgJQibgQQL6QSAKHnNwYW5uZXIuZ29vZ2xlYXBpcy5jb20vU2Vz", + "c2lvbhI7Cgt0cmFuc2FjdGlvbhgCIAEoCzImLmdvb2dsZS5zcGFubmVyLnYx", + "LlRyYW5zYWN0aW9uU2VsZWN0b3ISEgoFdGFibGUYAyABKAlCA+BBAhINCgVp", + "bmRleBgEIAEoCRIPCgdjb2x1bW5zGAUgAygJEi8KB2tleV9zZXQYBiABKAsy", + "GS5nb29nbGUuc3Bhbm5lci52MS5LZXlTZXRCA+BBAhI+ChFwYXJ0aXRpb25f", + "b3B0aW9ucxgJIAEoCzIjLmdvb2dsZS5zcGFubmVyLnYxLlBhcnRpdGlvbk9w", + "dGlvbnMiJAoJUGFydGl0aW9uEhcKD3BhcnRpdGlvbl90b2tlbhgBIAEoDCJ6", + "ChFQYXJ0aXRpb25SZXNwb25zZRIwCgpwYXJ0aXRpb25zGAEgAygLMhwuZ29v", + "Z2xlLnNwYW5uZXIudjEuUGFydGl0aW9uEjMKC3RyYW5zYWN0aW9uGAIgASgL", + "Mh4uZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb24iygMKC1JlYWRSZXF1", + "ZXN0EjcKB3Nlc3Npb24YASABKAlCJuBBAvpBIAoec3Bhbm5lci5nb29nbGVh", + "cGlzLmNvbS9TZXNzaW9uEjsKC3RyYW5zYWN0aW9uGAIgASgLMiYuZ29vZ2xl", + "LnNwYW5uZXIudjEuVHJhbnNhY3Rpb25TZWxlY3RvchISCgV0YWJsZRgDIAEo", + "CUID4EECEg0KBWluZGV4GAQgASgJEhQKB2NvbHVtbnMYBSADKAlCA+BBAhIv", + "CgdrZXlfc2V0GAYgASgLMhkuZ29vZ2xlLnNwYW5uZXIudjEuS2V5U2V0QgPg", + "QQISDQoFbGltaXQYCCABKAMSFAoMcmVzdW1lX3Rva2VuGAkgASgMEhcKD3Bh", + "cnRpdGlvbl90b2tlbhgKIAEoDBI6Cg9yZXF1ZXN0X29wdGlvbnMYCyABKAsy", + "IS5nb29nbGUuc3Bhbm5lci52MS5SZXF1ZXN0T3B0aW9ucxJFChVkaXJlY3Rl", + "ZF9yZWFkX29wdGlvbnMYDiABKAsyJi5nb29nbGUuc3Bhbm5lci52MS5EaXJl", + "Y3RlZFJlYWRPcHRpb25zEhoKEmRhdGFfYm9vc3RfZW5hYmxlZBgPIAEoCCLL", + "AQoXQmVnaW5UcmFuc2FjdGlvblJlcXVlc3QSNwoHc2Vzc2lvbhgBIAEoCUIm", + "4EEC+kEgCh5zcGFubmVyLmdvb2dsZWFwaXMuY29tL1Nlc3Npb24SOwoHb3B0", + "aW9ucxgCIAEoCzIlLmdvb2dsZS5zcGFubmVyLnYxLlRyYW5zYWN0aW9uT3B0", + "aW9uc0ID4EECEjoKD3JlcXVlc3Rfb3B0aW9ucxgDIAEoCzIhLmdvb2dsZS5z", + "cGFubmVyLnYxLlJlcXVlc3RPcHRpb25zIv0CCg1Db21taXRSZXF1ZXN0EjcK", + "B3Nlc3Npb24YASABKAlCJuBBAvpBIAoec3Bhbm5lci5nb29nbGVhcGlzLmNv", + "bS9TZXNzaW9uEhgKDnRyYW5zYWN0aW9uX2lkGAIgASgMSAASRwoWc2luZ2xl", + "X3VzZV90cmFuc2FjdGlvbhgDIAEoCzIlLmdvb2dsZS5zcGFubmVyLnYxLlRy", + "YW5zYWN0aW9uT3B0aW9uc0gAEi4KCW11dGF0aW9ucxgEIAMoCzIbLmdvb2ds", + "ZS5zcGFubmVyLnYxLk11dGF0aW9uEhsKE3JldHVybl9jb21taXRfc3RhdHMY", + "BSABKAgSOAoQbWF4X2NvbW1pdF9kZWxheRgIIAEoCzIZLmdvb2dsZS5wcm90", + "b2J1Zi5EdXJhdGlvbkID4EEBEjoKD3JlcXVlc3Rfb3B0aW9ucxgGIAEoCzIh", + "Lmdvb2dsZS5zcGFubmVyLnYxLlJlcXVlc3RPcHRpb25zQg0KC3RyYW5zYWN0", + "aW9uImcKD1JvbGxiYWNrUmVxdWVzdBI3CgdzZXNzaW9uGAEgASgJQibgQQL6", + "QSAKHnNwYW5uZXIuZ29vZ2xlYXBpcy5jb20vU2Vzc2lvbhIbCg50cmFuc2Fj", + "dGlvbl9pZBgCIAEoDEID4EECIs4CChFCYXRjaFdyaXRlUmVxdWVzdBI3Cgdz", + "ZXNzaW9uGAEgASgJQibgQQL6QSAKHnNwYW5uZXIuZ29vZ2xlYXBpcy5jb20v", + "U2Vzc2lvbhI6Cg9yZXF1ZXN0X29wdGlvbnMYAyABKAsyIS5nb29nbGUuc3Bh", + "bm5lci52MS5SZXF1ZXN0T3B0aW9ucxJQCg9tdXRhdGlvbl9ncm91cHMYBCAD", + "KAsyMi5nb29nbGUuc3Bhbm5lci52MS5CYXRjaFdyaXRlUmVxdWVzdC5NdXRh", + "dGlvbkdyb3VwQgPgQQISLAofZXhjbHVkZV90eG5fZnJvbV9jaGFuZ2Vfc3Ry", + "ZWFtcxgFIAEoCEID4EEBGkQKDU11dGF0aW9uR3JvdXASMwoJbXV0YXRpb25z", + "GAEgAygLMhsuZ29vZ2xlLnNwYW5uZXIudjEuTXV0YXRpb25CA+BBAiJ/ChJC", + "YXRjaFdyaXRlUmVzcG9uc2USDwoHaW5kZXhlcxgBIAMoBRIiCgZzdGF0dXMY", + "AiABKAsyEi5nb29nbGUucnBjLlN0YXR1cxI0ChBjb21taXRfdGltZXN0YW1w", + "GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcDKLGAoHU3Bhbm5l", + "chKmAQoNQ3JlYXRlU2Vzc2lvbhInLmdvb2dsZS5zcGFubmVyLnYxLkNyZWF0", + "ZVNlc3Npb25SZXF1ZXN0GhouZ29vZ2xlLnNwYW5uZXIudjEuU2Vzc2lvbiJQ", + "2kEIZGF0YWJhc2WC0+STAj8iOi92MS97ZGF0YWJhc2U9cHJvamVjdHMvKi9p", + "bnN0YW5jZXMvKi9kYXRhYmFzZXMvKn0vc2Vzc2lvbnM6ASoS4AEKE0JhdGNo", + "Q3JlYXRlU2Vzc2lvbnMSLS5nb29nbGUuc3Bhbm5lci52MS5CYXRjaENyZWF0", + "ZVNlc3Npb25zUmVxdWVzdBouLmdvb2dsZS5zcGFubmVyLnYxLkJhdGNoQ3Jl", + "YXRlU2Vzc2lvbnNSZXNwb25zZSJq2kEWZGF0YWJhc2Usc2Vzc2lvbl9jb3Vu", + "dILT5JMCSyJGL3YxL3tkYXRhYmFzZT1wcm9qZWN0cy8qL2luc3RhbmNlcy8q", + "L2RhdGFiYXNlcy8qfS9zZXNzaW9uczpiYXRjaENyZWF0ZToBKhKXAQoKR2V0", + "U2Vzc2lvbhIkLmdvb2dsZS5zcGFubmVyLnYxLkdldFNlc3Npb25SZXF1ZXN0", + "GhouZ29vZ2xlLnNwYW5uZXIudjEuU2Vzc2lvbiJH2kEEbmFtZYLT5JMCOhI4", + "L3YxL3tuYW1lPXByb2plY3RzLyovaW5zdGFuY2VzLyovZGF0YWJhc2VzLyov", + "c2Vzc2lvbnMvKn0SrgEKDExpc3RTZXNzaW9ucxImLmdvb2dsZS5zcGFubmVy", + "LnYxLkxpc3RTZXNzaW9uc1JlcXVlc3QaJy5nb29nbGUuc3Bhbm5lci52MS5M", + "aXN0U2Vzc2lvbnNSZXNwb25zZSJN2kEIZGF0YWJhc2WC0+STAjwSOi92MS97", + "ZGF0YWJhc2U9cHJvamVjdHMvKi9pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn0v", + "c2Vzc2lvbnMSmQEKDURlbGV0ZVNlc3Npb24SJy5nb29nbGUuc3Bhbm5lci52", + "MS5EZWxldGVTZXNzaW9uUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0", + "eSJH2kEEbmFtZYLT5JMCOio4L3YxL3tuYW1lPXByb2plY3RzLyovaW5zdGFu", + "Y2VzLyovZGF0YWJhc2VzLyovc2Vzc2lvbnMvKn0SowEKCkV4ZWN1dGVTcWwS", + "JC5nb29nbGUuc3Bhbm5lci52MS5FeGVjdXRlU3FsUmVxdWVzdBocLmdvb2ds", + "ZS5zcGFubmVyLnYxLlJlc3VsdFNldCJRgtPkkwJLIkYvdjEve3Nlc3Npb249", + "cHJvamVjdHMvKi9pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9zZXNzaW9ucy8q", + "fTpleGVjdXRlU3FsOgEqEr4BChNFeGVjdXRlU3RyZWFtaW5nU3FsEiQuZ29v", + "Z2xlLnNwYW5uZXIudjEuRXhlY3V0ZVNxbFJlcXVlc3QaIy5nb29nbGUuc3Bh", + "bm5lci52MS5QYXJ0aWFsUmVzdWx0U2V0IlqC0+STAlQiTy92MS97c2Vzc2lv", + "bj1wcm9qZWN0cy8qL2luc3RhbmNlcy8qL2RhdGFiYXNlcy8qL3Nlc3Npb25z", + "Lyp9OmV4ZWN1dGVTdHJlYW1pbmdTcWw6ASowARLAAQoPRXhlY3V0ZUJhdGNo", + "RG1sEikuZ29vZ2xlLnNwYW5uZXIudjEuRXhlY3V0ZUJhdGNoRG1sUmVxdWVz", + "dBoqLmdvb2dsZS5zcGFubmVyLnYxLkV4ZWN1dGVCYXRjaERtbFJlc3BvbnNl", + "IlaC0+STAlAiSy92MS97c2Vzc2lvbj1wcm9qZWN0cy8qL2luc3RhbmNlcy8q", + "L2RhdGFiYXNlcy8qL3Nlc3Npb25zLyp9OmV4ZWN1dGVCYXRjaERtbDoBKhKR", + "AQoEUmVhZBIeLmdvb2dsZS5zcGFubmVyLnYxLlJlYWRSZXF1ZXN0GhwuZ29v", + "Z2xlLnNwYW5uZXIudjEuUmVzdWx0U2V0IkuC0+STAkUiQC92MS97c2Vzc2lv", + "bj1wcm9qZWN0cy8qL2luc3RhbmNlcy8qL2RhdGFiYXNlcy8qL3Nlc3Npb25z", + "Lyp9OnJlYWQ6ASoSrAEKDVN0cmVhbWluZ1JlYWQSHi5nb29nbGUuc3Bhbm5l", + "ci52MS5SZWFkUmVxdWVzdBojLmdvb2dsZS5zcGFubmVyLnYxLlBhcnRpYWxS", + "ZXN1bHRTZXQiVILT5JMCTiJJL3YxL3tzZXNzaW9uPXByb2plY3RzLyovaW5z", + "dGFuY2VzLyovZGF0YWJhc2VzLyovc2Vzc2lvbnMvKn06c3RyZWFtaW5nUmVh", + "ZDoBKjABEskBChBCZWdpblRyYW5zYWN0aW9uEiouZ29vZ2xlLnNwYW5uZXIu", + "djEuQmVnaW5UcmFuc2FjdGlvblJlcXVlc3QaHi5nb29nbGUuc3Bhbm5lci52", + "MS5UcmFuc2FjdGlvbiJp2kEPc2Vzc2lvbixvcHRpb25zgtPkkwJRIkwvdjEv", + "e3Nlc3Npb249cHJvamVjdHMvKi9pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9z", + "ZXNzaW9ucy8qfTpiZWdpblRyYW5zYWN0aW9uOgEqEusBCgZDb21taXQSIC5n", + "b29nbGUuc3Bhbm5lci52MS5Db21taXRSZXF1ZXN0GiEuZ29vZ2xlLnNwYW5u", + "ZXIudjEuQ29tbWl0UmVzcG9uc2UimwHaQSBzZXNzaW9uLHRyYW5zYWN0aW9u", + "X2lkLG11dGF0aW9uc9pBKHNlc3Npb24sc2luZ2xlX3VzZV90cmFuc2FjdGlv", + "bixtdXRhdGlvbnOC0+STAkciQi92MS97c2Vzc2lvbj1wcm9qZWN0cy8qL2lu", + "c3RhbmNlcy8qL2RhdGFiYXNlcy8qL3Nlc3Npb25zLyp9OmNvbW1pdDoBKhKw", + "AQoIUm9sbGJhY2sSIi5nb29nbGUuc3Bhbm5lci52MS5Sb2xsYmFja1JlcXVl", + "c3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiaNpBFnNlc3Npb24sdHJhbnNh", + "Y3Rpb25faWSC0+STAkkiRC92MS97c2Vzc2lvbj1wcm9qZWN0cy8qL2luc3Rh", + "bmNlcy8qL2RhdGFiYXNlcy8qL3Nlc3Npb25zLyp9OnJvbGxiYWNrOgEqErcB", + "Cg5QYXJ0aXRpb25RdWVyeRIoLmdvb2dsZS5zcGFubmVyLnYxLlBhcnRpdGlv", + "blF1ZXJ5UmVxdWVzdBokLmdvb2dsZS5zcGFubmVyLnYxLlBhcnRpdGlvblJl", + "c3BvbnNlIlWC0+STAk8iSi92MS97c2Vzc2lvbj1wcm9qZWN0cy8qL2luc3Rh", + "bmNlcy8qL2RhdGFiYXNlcy8qL3Nlc3Npb25zLyp9OnBhcnRpdGlvblF1ZXJ5", + "OgEqErQBCg1QYXJ0aXRpb25SZWFkEicuZ29vZ2xlLnNwYW5uZXIudjEuUGFy", + "dGl0aW9uUmVhZFJlcXVlc3QaJC5nb29nbGUuc3Bhbm5lci52MS5QYXJ0aXRp", + "b25SZXNwb25zZSJUgtPkkwJOIkkvdjEve3Nlc3Npb249cHJvamVjdHMvKi9p", + "bnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9zZXNzaW9ucy8qfTpwYXJ0aXRpb25S", + "ZWFkOgEqEsgBCgpCYXRjaFdyaXRlEiQuZ29vZ2xlLnNwYW5uZXIudjEuQmF0", + "Y2hXcml0ZVJlcXVlc3QaJS5nb29nbGUuc3Bhbm5lci52MS5CYXRjaFdyaXRl", + "UmVzcG9uc2Uia9pBF3Nlc3Npb24sbXV0YXRpb25fZ3JvdXBzgtPkkwJLIkYv", + "djEve3Nlc3Npb249cHJvamVjdHMvKi9pbnN0YW5jZXMvKi9kYXRhYmFzZXMv", + "Ki9zZXNzaW9ucy8qfTpiYXRjaFdyaXRlOgEqMAEad8pBFnNwYW5uZXIuZ29v", + "Z2xlYXBpcy5jb23SQVtodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRo", + "L2Nsb3VkLXBsYXRmb3JtLGh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1", + "dGgvc3Bhbm5lci5kYXRhQpECChVjb20uZ29vZ2xlLnNwYW5uZXIudjFCDFNw", + "YW5uZXJQcm90b1ABWjVjbG91ZC5nb29nbGUuY29tL2dvL3NwYW5uZXIvYXBp", + "djEvc3Bhbm5lcnBiO3NwYW5uZXJwYqoCF0dvb2dsZS5DbG91ZC5TcGFubmVy", + "LlYxygIXR29vZ2xlXENsb3VkXFNwYW5uZXJcVjHqAhpHb29nbGU6OkNsb3Vk", + "OjpTcGFubmVyOjpWMepBXwofc3Bhbm5lci5nb29nbGVhcGlzLmNvbS9EYXRh", + "YmFzZRI8cHJvamVjdHMve3Byb2plY3R9L2luc3RhbmNlcy97aW5zdGFuY2V9", + "L2RhdGFiYXNlcy97ZGF0YWJhc2V9UABiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Cloud.Spanner.V1.CommitResponseReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Rpc.StatusReflection.Descriptor, global::Google.Cloud.Spanner.V1.KeysReflection.Descriptor, global::Google.Cloud.Spanner.V1.MutationReflection.Descriptor, global::Google.Cloud.Spanner.V1.ResultSetReflection.Descriptor, global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor, global::Google.Cloud.Spanner.V1.TypeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.CreateSessionRequest), global::Google.Cloud.Spanner.V1.CreateSessionRequest.Parser, new[]{ "Database", "Session" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest), global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest.Parser, new[]{ "Database", "SessionTemplate", "SessionCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BatchCreateSessionsResponse), global::Google.Cloud.Spanner.V1.BatchCreateSessionsResponse.Parser, new[]{ "Session" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Session), global::Google.Cloud.Spanner.V1.Session.Parser, new[]{ "Name", "Labels", "CreateTime", "ApproximateLastUseTime", "CreatorRole", "Multiplexed" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.GetSessionRequest), global::Google.Cloud.Spanner.V1.GetSessionRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ListSessionsRequest), global::Google.Cloud.Spanner.V1.ListSessionsRequest.Parser, new[]{ "Database", "PageSize", "PageToken", "Filter" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ListSessionsResponse), global::Google.Cloud.Spanner.V1.ListSessionsResponse.Parser, new[]{ "Sessions", "NextPageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.DeleteSessionRequest), global::Google.Cloud.Spanner.V1.DeleteSessionRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.RequestOptions), global::Google.Cloud.Spanner.V1.RequestOptions.Parser, new[]{ "Priority", "RequestTag", "TransactionTag" }, null, new[]{ typeof(global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.DirectedReadOptions), global::Google.Cloud.Spanner.V1.DirectedReadOptions.Parser, new[]{ "IncludeReplicas", "ExcludeReplicas" }, new[]{ "Replicas" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection), global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Parser, new[]{ "Location", "Type" }, null, new[]{ typeof(global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas), global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas.Parser, new[]{ "ReplicaSelections", "AutoFailoverDisabled" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas), global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas.Parser, new[]{ "ReplicaSelections" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest), global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Parser, new[]{ "Session", "Transaction", "Sql", "Params", "ParamTypes", "ResumeToken", "QueryMode", "PartitionToken", "Seqno", "QueryOptions", "RequestOptions", "DirectedReadOptions", "DataBoostEnabled" }, null, new[]{ typeof(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions), global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions.Parser, new[]{ "OptimizerVersion", "OptimizerStatisticsPackage" }, null, null, null, null), + null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest), global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Parser, new[]{ "Session", "Transaction", "Statements", "Seqno", "RequestOptions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement), global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement.Parser, new[]{ "Sql", "Params", "ParamTypes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse), global::Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse.Parser, new[]{ "ResultSets", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartitionOptions), global::Google.Cloud.Spanner.V1.PartitionOptions.Parser, new[]{ "PartitionSizeBytes", "MaxPartitions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartitionQueryRequest), global::Google.Cloud.Spanner.V1.PartitionQueryRequest.Parser, new[]{ "Session", "Transaction", "Sql", "Params", "ParamTypes", "PartitionOptions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartitionReadRequest), global::Google.Cloud.Spanner.V1.PartitionReadRequest.Parser, new[]{ "Session", "Transaction", "Table", "Index", "Columns", "KeySet", "PartitionOptions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Partition), global::Google.Cloud.Spanner.V1.Partition.Parser, new[]{ "PartitionToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartitionResponse), global::Google.Cloud.Spanner.V1.PartitionResponse.Parser, new[]{ "Partitions", "Transaction" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ReadRequest), global::Google.Cloud.Spanner.V1.ReadRequest.Parser, new[]{ "Session", "Transaction", "Table", "Index", "Columns", "KeySet", "Limit", "ResumeToken", "PartitionToken", "RequestOptions", "DirectedReadOptions", "DataBoostEnabled" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BeginTransactionRequest), global::Google.Cloud.Spanner.V1.BeginTransactionRequest.Parser, new[]{ "Session", "Options", "RequestOptions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.CommitRequest), global::Google.Cloud.Spanner.V1.CommitRequest.Parser, new[]{ "Session", "TransactionId", "SingleUseTransaction", "Mutations", "ReturnCommitStats", "MaxCommitDelay", "RequestOptions" }, new[]{ "Transaction" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.RollbackRequest), global::Google.Cloud.Spanner.V1.RollbackRequest.Parser, new[]{ "Session", "TransactionId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BatchWriteRequest), global::Google.Cloud.Spanner.V1.BatchWriteRequest.Parser, new[]{ "Session", "RequestOptions", "MutationGroups", "ExcludeTxnFromChangeStreams" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BatchWriteRequest.Types.MutationGroup), global::Google.Cloud.Spanner.V1.BatchWriteRequest.Types.MutationGroup.Parser, new[]{ "Mutations" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.BatchWriteResponse), global::Google.Cloud.Spanner.V1.BatchWriteResponse.Parser, new[]{ "Indexes", "Status", "CommitTimestamp" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// The request for [CreateSession][google.spanner.v1.Spanner.CreateSession]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateSessionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateSessionRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSessionRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSessionRequest(CreateSessionRequest other) : this() { + database_ = other.database_; + session_ = other.session_ != null ? other.session_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateSessionRequest Clone() { + return new CreateSessionRequest(this); + } + + /// Field number for the "database" field. + public const int DatabaseFieldNumber = 1; + private string database_ = ""; + /// + /// Required. The database in which the new session is created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Database { + get { return database_; } + set { + database_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Session session_; + /// + /// Required. The session to create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Session Session { + get { return session_; } + set { + session_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateSessionRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateSessionRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Database != other.Database) return false; + if (!object.Equals(Session, other.Session)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Database.Length != 0) hash ^= Database.GetHashCode(); + if (session_ != null) hash ^= Session.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (session_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Session); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (session_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Session); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Database.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Database); + } + if (session_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Session); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateSessionRequest other) { + if (other == null) { + return; + } + if (other.Database.Length != 0) { + Database = other.Database; + } + if (other.session_ != null) { + if (session_ == null) { + Session = new global::Google.Cloud.Spanner.V1.Session(); + } + Session.MergeFrom(other.Session); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 18: { + if (session_ == null) { + Session = new global::Google.Cloud.Spanner.V1.Session(); + } + input.ReadMessage(Session); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 18: { + if (session_ == null) { + Session = new global::Google.Cloud.Spanner.V1.Session(); + } + input.ReadMessage(Session); + break; + } + } + } + } + #endif + + } + + /// + /// The request for + /// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchCreateSessionsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchCreateSessionsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsRequest(BatchCreateSessionsRequest other) : this() { + database_ = other.database_; + sessionTemplate_ = other.sessionTemplate_ != null ? other.sessionTemplate_.Clone() : null; + sessionCount_ = other.sessionCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsRequest Clone() { + return new BatchCreateSessionsRequest(this); + } + + /// Field number for the "database" field. + public const int DatabaseFieldNumber = 1; + private string database_ = ""; + /// + /// Required. The database in which the new sessions are created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Database { + get { return database_; } + set { + database_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "session_template" field. + public const int SessionTemplateFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Session sessionTemplate_; + /// + /// Parameters to be applied to each created session. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Session SessionTemplate { + get { return sessionTemplate_; } + set { + sessionTemplate_ = value; + } + } + + /// Field number for the "session_count" field. + public const int SessionCountFieldNumber = 3; + private int sessionCount_; + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SessionCount { + get { return sessionCount_; } + set { + sessionCount_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchCreateSessionsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchCreateSessionsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Database != other.Database) return false; + if (!object.Equals(SessionTemplate, other.SessionTemplate)) return false; + if (SessionCount != other.SessionCount) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Database.Length != 0) hash ^= Database.GetHashCode(); + if (sessionTemplate_ != null) hash ^= SessionTemplate.GetHashCode(); + if (SessionCount != 0) hash ^= SessionCount.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (sessionTemplate_ != null) { + output.WriteRawTag(18); + output.WriteMessage(SessionTemplate); + } + if (SessionCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(SessionCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (sessionTemplate_ != null) { + output.WriteRawTag(18); + output.WriteMessage(SessionTemplate); + } + if (SessionCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(SessionCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Database.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Database); + } + if (sessionTemplate_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SessionTemplate); + } + if (SessionCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SessionCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchCreateSessionsRequest other) { + if (other == null) { + return; + } + if (other.Database.Length != 0) { + Database = other.Database; + } + if (other.sessionTemplate_ != null) { + if (sessionTemplate_ == null) { + SessionTemplate = new global::Google.Cloud.Spanner.V1.Session(); + } + SessionTemplate.MergeFrom(other.SessionTemplate); + } + if (other.SessionCount != 0) { + SessionCount = other.SessionCount; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 18: { + if (sessionTemplate_ == null) { + SessionTemplate = new global::Google.Cloud.Spanner.V1.Session(); + } + input.ReadMessage(SessionTemplate); + break; + } + case 24: { + SessionCount = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 18: { + if (sessionTemplate_ == null) { + SessionTemplate = new global::Google.Cloud.Spanner.V1.Session(); + } + input.ReadMessage(SessionTemplate); + break; + } + case 24: { + SessionCount = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// The response for + /// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchCreateSessionsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchCreateSessionsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsResponse(BatchCreateSessionsResponse other) : this() { + session_ = other.session_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchCreateSessionsResponse Clone() { + return new BatchCreateSessionsResponse(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_session_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.Session.Parser); + private readonly pbc::RepeatedField session_ = new pbc::RepeatedField(); + /// + /// The freshly created sessions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Session { + get { return session_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchCreateSessionsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchCreateSessionsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!session_.Equals(other.session_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= session_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + session_.WriteTo(output, _repeated_session_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + session_.WriteTo(ref output, _repeated_session_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += session_.CalculateSize(_repeated_session_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchCreateSessionsResponse other) { + if (other == null) { + return; + } + session_.Add(other.session_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + session_.AddEntriesFrom(input, _repeated_session_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + session_.AddEntriesFrom(ref input, _repeated_session_codec); + break; + } + } + } + } + #endif + + } + + /// + /// A session in the Cloud Spanner API. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Session : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Session()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Session() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Session(Session other) : this() { + name_ = other.name_; + labels_ = other.labels_.Clone(); + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + approximateLastUseTime_ = other.approximateLastUseTime_ != null ? other.approximateLastUseTime_.Clone() : null; + creatorRole_ = other.creatorRole_; + multiplexed_ = other.multiplexed_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Session Clone() { + return new Session(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Output only. The name of the session. This is always system-assigned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 18); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// The labels for the session. + /// + /// * Label keys must be between 1 and 63 characters long and must conform to + /// the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + /// * Label values must be between 0 and 63 characters long and must conform + /// to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + /// * No more than 64 labels can be associated with a given session. + /// + /// See https://goo.gl/xmQnxf for more information on and examples of labels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. The timestamp when the session is created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CreateTime { + get { return createTime_; } + set { + createTime_ = value; + } + } + + /// Field number for the "approximate_last_use_time" field. + public const int ApproximateLastUseTimeFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.Timestamp approximateLastUseTime_; + /// + /// Output only. The approximate timestamp when the session is last used. It is + /// typically earlier than the actual last use time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp ApproximateLastUseTime { + get { return approximateLastUseTime_; } + set { + approximateLastUseTime_ = value; + } + } + + /// Field number for the "creator_role" field. + public const int CreatorRoleFieldNumber = 5; + private string creatorRole_ = ""; + /// + /// The database role which created this session. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CreatorRole { + get { return creatorRole_; } + set { + creatorRole_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "multiplexed" field. + public const int MultiplexedFieldNumber = 6; + private bool multiplexed_; + /// + /// Optional. If true, specifies a multiplexed session. A multiplexed session + /// may be used for multiple, concurrent read-only operations but can not be + /// used for read-write transactions, partitioned reads, or partitioned + /// queries. Multiplexed sessions can be created via + /// [CreateSession][google.spanner.v1.Spanner.CreateSession] but not via + /// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + /// Multiplexed sessions may not be deleted nor listed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Multiplexed { + get { return multiplexed_; } + set { + multiplexed_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Session); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Session other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!Labels.Equals(other.Labels)) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(ApproximateLastUseTime, other.ApproximateLastUseTime)) return false; + if (CreatorRole != other.CreatorRole) return false; + if (Multiplexed != other.Multiplexed) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (approximateLastUseTime_ != null) hash ^= ApproximateLastUseTime.GetHashCode(); + if (CreatorRole.Length != 0) hash ^= CreatorRole.GetHashCode(); + if (Multiplexed != false) hash ^= Multiplexed.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + labels_.WriteTo(output, _map_labels_codec); + if (createTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CreateTime); + } + if (approximateLastUseTime_ != null) { + output.WriteRawTag(34); + output.WriteMessage(ApproximateLastUseTime); + } + if (CreatorRole.Length != 0) { + output.WriteRawTag(42); + output.WriteString(CreatorRole); + } + if (Multiplexed != false) { + output.WriteRawTag(48); + output.WriteBool(Multiplexed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (createTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CreateTime); + } + if (approximateLastUseTime_ != null) { + output.WriteRawTag(34); + output.WriteMessage(ApproximateLastUseTime); + } + if (CreatorRole.Length != 0) { + output.WriteRawTag(42); + output.WriteString(CreatorRole); + } + if (Multiplexed != false) { + output.WriteRawTag(48); + output.WriteBool(Multiplexed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += labels_.CalculateSize(_map_labels_codec); + if (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (approximateLastUseTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ApproximateLastUseTime); + } + if (CreatorRole.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CreatorRole); + } + if (Multiplexed != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Session other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + labels_.MergeFrom(other.labels_); + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.approximateLastUseTime_ != null) { + if (approximateLastUseTime_ == null) { + ApproximateLastUseTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + ApproximateLastUseTime.MergeFrom(other.ApproximateLastUseTime); + } + if (other.CreatorRole.Length != 0) { + CreatorRole = other.CreatorRole; + } + if (other.Multiplexed != false) { + Multiplexed = other.Multiplexed; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 26: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 34: { + if (approximateLastUseTime_ == null) { + ApproximateLastUseTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(ApproximateLastUseTime); + break; + } + case 42: { + CreatorRole = input.ReadString(); + break; + } + case 48: { + Multiplexed = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 26: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 34: { + if (approximateLastUseTime_ == null) { + ApproximateLastUseTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(ApproximateLastUseTime); + break; + } + case 42: { + CreatorRole = input.ReadString(); + break; + } + case 48: { + Multiplexed = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [GetSession][google.spanner.v1.Spanner.GetSession]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetSessionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSessionRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSessionRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSessionRequest(GetSessionRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSessionRequest Clone() { + return new GetSessionRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the session to retrieve. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetSessionRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetSessionRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetSessionRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [ListSessions][google.spanner.v1.Spanner.ListSessions]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListSessionsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListSessionsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsRequest(ListSessionsRequest other) : this() { + database_ = other.database_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + filter_ = other.filter_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsRequest Clone() { + return new ListSessionsRequest(this); + } + + /// Field number for the "database" field. + public const int DatabaseFieldNumber = 1; + private string database_ = ""; + /// + /// Required. The database in which to list sessions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Database { + get { return database_; } + set { + database_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Number of sessions to be returned in the response. If 0 or less, defaults + /// to the server's maximum allowed page size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// If non-empty, `page_token` should contain a + /// [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token] + /// from a previous + /// [ListSessionsResponse][google.spanner.v1.ListSessionsResponse]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filter" field. + public const int FilterFieldNumber = 4; + private string filter_ = ""; + /// + /// An expression for filtering the results of the request. Filter rules are + /// case insensitive. The fields eligible for filtering are: + /// + /// * `labels.key` where key is the name of a label + /// + /// Some examples of using filters are: + /// + /// * `labels.env:*` --> The session has the label "env". + /// * `labels.env:dev` --> The session has the label "env" and the value of + /// the label contains the string "dev". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListSessionsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListSessionsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Database != other.Database) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Filter != other.Filter) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Database.Length != 0) hash ^= Database.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Database.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Database); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Database.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Database); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListSessionsRequest other) { + if (other == null) { + return; + } + if (other.Database.Length != 0) { + Database = other.Database; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Database = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// The response for [ListSessions][google.spanner.v1.Spanner.ListSessions]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListSessionsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListSessionsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsResponse(ListSessionsResponse other) : this() { + sessions_ = other.sessions_.Clone(); + nextPageToken_ = other.nextPageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListSessionsResponse Clone() { + return new ListSessionsResponse(this); + } + + /// Field number for the "sessions" field. + public const int SessionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sessions_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.Session.Parser); + private readonly pbc::RepeatedField sessions_ = new pbc::RepeatedField(); + /// + /// The list of requested sessions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Sessions { + get { return sessions_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// `next_page_token` can be sent in a subsequent + /// [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more + /// of the matching sessions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListSessionsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListSessionsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sessions_.Equals(other.sessions_)) return false; + if (NextPageToken != other.NextPageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sessions_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sessions_.WriteTo(output, _repeated_sessions_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sessions_.WriteTo(ref output, _repeated_sessions_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sessions_.CalculateSize(_repeated_sessions_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListSessionsResponse other) { + if (other == null) { + return; + } + sessions_.Add(other.sessions_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sessions_.AddEntriesFrom(input, _repeated_sessions_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sessions_.AddEntriesFrom(ref input, _repeated_sessions_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteSessionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteSessionRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteSessionRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteSessionRequest(DeleteSessionRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteSessionRequest Clone() { + return new DeleteSessionRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the session to delete. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteSessionRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteSessionRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteSessionRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Common request options for various APIs. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RequestOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RequestOptions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestOptions(RequestOptions other) : this() { + priority_ = other.priority_; + requestTag_ = other.requestTag_; + transactionTag_ = other.transactionTag_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestOptions Clone() { + return new RequestOptions(this); + } + + /// Field number for the "priority" field. + public const int PriorityFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority priority_ = global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified; + /// + /// Priority for the request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority Priority { + get { return priority_; } + set { + priority_ = value; + } + } + + /// Field number for the "request_tag" field. + public const int RequestTagFieldNumber = 2; + private string requestTag_ = ""; + /// + /// A per-request tag which can be applied to queries or reads, used for + /// statistics collection. + /// Both request_tag and transaction_tag can be specified for a read or query + /// that belongs to a transaction. + /// This field is ignored for requests where it's not applicable (e.g. + /// CommitRequest). + /// Legal characters for `request_tag` values are all printable characters + /// (ASCII 32 - 126) and the length of a request_tag is limited to 50 + /// characters. Values that exceed this limit are truncated. + /// Any leading underscore (_) characters will be removed from the string. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestTag { + get { return requestTag_; } + set { + requestTag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction_tag" field. + public const int TransactionTagFieldNumber = 3; + private string transactionTag_ = ""; + /// + /// A tag used for statistics collection about this transaction. + /// Both request_tag and transaction_tag can be specified for a read or query + /// that belongs to a transaction. + /// The value of transaction_tag should be the same for all requests belonging + /// to the same transaction. + /// If this request doesn't belong to any transaction, transaction_tag will be + /// ignored. + /// Legal characters for `transaction_tag` values are all printable characters + /// (ASCII 32 - 126) and the length of a transaction_tag is limited to 50 + /// characters. Values that exceed this limit are truncated. + /// Any leading underscore (_) characters will be removed from the string. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TransactionTag { + get { return transactionTag_; } + set { + transactionTag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RequestOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RequestOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Priority != other.Priority) return false; + if (RequestTag != other.RequestTag) return false; + if (TransactionTag != other.TransactionTag) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Priority != global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified) hash ^= Priority.GetHashCode(); + if (RequestTag.Length != 0) hash ^= RequestTag.GetHashCode(); + if (TransactionTag.Length != 0) hash ^= TransactionTag.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Priority != global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Priority); + } + if (RequestTag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestTag); + } + if (TransactionTag.Length != 0) { + output.WriteRawTag(26); + output.WriteString(TransactionTag); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Priority != global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Priority); + } + if (RequestTag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestTag); + } + if (TransactionTag.Length != 0) { + output.WriteRawTag(26); + output.WriteString(TransactionTag); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Priority != global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Priority); + } + if (RequestTag.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestTag); + } + if (TransactionTag.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TransactionTag); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RequestOptions other) { + if (other == null) { + return; + } + if (other.Priority != global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority.Unspecified) { + Priority = other.Priority; + } + if (other.RequestTag.Length != 0) { + RequestTag = other.RequestTag; + } + if (other.TransactionTag.Length != 0) { + TransactionTag = other.TransactionTag; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Priority = (global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority) input.ReadEnum(); + break; + } + case 18: { + RequestTag = input.ReadString(); + break; + } + case 26: { + TransactionTag = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Priority = (global::Google.Cloud.Spanner.V1.RequestOptions.Types.Priority) input.ReadEnum(); + break; + } + case 18: { + RequestTag = input.ReadString(); + break; + } + case 26: { + TransactionTag = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the RequestOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The relative priority for requests. Note that priority is not applicable + /// for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. + /// + /// The priority acts as a hint to the Cloud Spanner scheduler and does not + /// guarantee priority or order of execution. For example: + /// + /// * Some parts of a write operation always execute at `PRIORITY_HIGH`, + /// regardless of the specified priority. This may cause you to see an + /// increase in high priority workload even when executing a low priority + /// request. This can also potentially cause a priority inversion where a + /// lower priority request will be fulfilled ahead of a higher priority + /// request. + /// * If a transaction contains multiple operations with different priorities, + /// Cloud Spanner does not guarantee to process the higher priority + /// operations first. There may be other constraints to satisfy, such as + /// order of operations. + /// + public enum Priority { + /// + /// `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`. + /// + [pbr::OriginalName("PRIORITY_UNSPECIFIED")] Unspecified = 0, + /// + /// This specifies that the request is low priority. + /// + [pbr::OriginalName("PRIORITY_LOW")] Low = 1, + /// + /// This specifies that the request is medium priority. + /// + [pbr::OriginalName("PRIORITY_MEDIUM")] Medium = 2, + /// + /// This specifies that the request is high priority. + /// + [pbr::OriginalName("PRIORITY_HIGH")] High = 3, + } + + } + #endregion + + } + + /// + /// The DirectedReadOptions can be used to indicate which replicas or regions + /// should be used for non-transactional reads or queries. + /// + /// DirectedReadOptions may only be specified for a read-only transaction, + /// otherwise the API will return an `INVALID_ARGUMENT` error. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DirectedReadOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DirectedReadOptions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DirectedReadOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DirectedReadOptions(DirectedReadOptions other) : this() { + switch (other.ReplicasCase) { + case ReplicasOneofCase.IncludeReplicas: + IncludeReplicas = other.IncludeReplicas.Clone(); + break; + case ReplicasOneofCase.ExcludeReplicas: + ExcludeReplicas = other.ExcludeReplicas.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DirectedReadOptions Clone() { + return new DirectedReadOptions(this); + } + + /// Field number for the "include_replicas" field. + public const int IncludeReplicasFieldNumber = 1; + /// + /// Include_replicas indicates the order of replicas (as they appear in + /// this list) to process the request. If auto_failover_disabled is set to + /// true and all replicas are exhausted without finding a healthy replica, + /// Spanner will wait for a replica in the list to become available, requests + /// may fail due to `DEADLINE_EXCEEDED` errors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas IncludeReplicas { + get { return replicasCase_ == ReplicasOneofCase.IncludeReplicas ? (global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas) replicas_ : null; } + set { + replicas_ = value; + replicasCase_ = value == null ? ReplicasOneofCase.None : ReplicasOneofCase.IncludeReplicas; + } + } + + /// Field number for the "exclude_replicas" field. + public const int ExcludeReplicasFieldNumber = 2; + /// + /// Exclude_replicas indicates that specified replicas should be excluded + /// from serving requests. Spanner will not route requests to the replicas + /// in this list. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas ExcludeReplicas { + get { return replicasCase_ == ReplicasOneofCase.ExcludeReplicas ? (global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas) replicas_ : null; } + set { + replicas_ = value; + replicasCase_ = value == null ? ReplicasOneofCase.None : ReplicasOneofCase.ExcludeReplicas; + } + } + + private object replicas_; + /// Enum of possible cases for the "replicas" oneof. + public enum ReplicasOneofCase { + None = 0, + IncludeReplicas = 1, + ExcludeReplicas = 2, + } + private ReplicasOneofCase replicasCase_ = ReplicasOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReplicasOneofCase ReplicasCase { + get { return replicasCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearReplicas() { + replicasCase_ = ReplicasOneofCase.None; + replicas_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DirectedReadOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DirectedReadOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(IncludeReplicas, other.IncludeReplicas)) return false; + if (!object.Equals(ExcludeReplicas, other.ExcludeReplicas)) return false; + if (ReplicasCase != other.ReplicasCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) hash ^= IncludeReplicas.GetHashCode(); + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) hash ^= ExcludeReplicas.GetHashCode(); + hash ^= (int) replicasCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) { + output.WriteRawTag(10); + output.WriteMessage(IncludeReplicas); + } + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) { + output.WriteRawTag(18); + output.WriteMessage(ExcludeReplicas); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) { + output.WriteRawTag(10); + output.WriteMessage(IncludeReplicas); + } + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) { + output.WriteRawTag(18); + output.WriteMessage(ExcludeReplicas); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(IncludeReplicas); + } + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExcludeReplicas); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DirectedReadOptions other) { + if (other == null) { + return; + } + switch (other.ReplicasCase) { + case ReplicasOneofCase.IncludeReplicas: + if (IncludeReplicas == null) { + IncludeReplicas = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas(); + } + IncludeReplicas.MergeFrom(other.IncludeReplicas); + break; + case ReplicasOneofCase.ExcludeReplicas: + if (ExcludeReplicas == null) { + ExcludeReplicas = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas(); + } + ExcludeReplicas.MergeFrom(other.ExcludeReplicas); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas subBuilder = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas(); + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) { + subBuilder.MergeFrom(IncludeReplicas); + } + input.ReadMessage(subBuilder); + IncludeReplicas = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas subBuilder = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas(); + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) { + subBuilder.MergeFrom(ExcludeReplicas); + } + input.ReadMessage(subBuilder); + ExcludeReplicas = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas subBuilder = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.IncludeReplicas(); + if (replicasCase_ == ReplicasOneofCase.IncludeReplicas) { + subBuilder.MergeFrom(IncludeReplicas); + } + input.ReadMessage(subBuilder); + IncludeReplicas = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas subBuilder = new global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ExcludeReplicas(); + if (replicasCase_ == ReplicasOneofCase.ExcludeReplicas) { + subBuilder.MergeFrom(ExcludeReplicas); + } + input.ReadMessage(subBuilder); + ExcludeReplicas = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the DirectedReadOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The directed read replica selector. + /// Callers must provide one or more of the following fields for replica + /// selection: + /// + /// * `location` - The location must be one of the regions within the + /// multi-region configuration of your database. + /// * `type` - The type of the replica. + /// + /// Some examples of using replica_selectors are: + /// + /// * `location:us-east1` --> The "us-east1" replica(s) of any available type + /// will be used to process the request. + /// * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest + /// available location will be used to process the + /// request. + /// * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) + /// in location "us-east1" will be used to process + /// the request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReplicaSelection : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReplicaSelection()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.DirectedReadOptions.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReplicaSelection() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReplicaSelection(ReplicaSelection other) : this() { + location_ = other.location_; + type_ = other.type_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReplicaSelection Clone() { + return new ReplicaSelection(this); + } + + /// Field number for the "location" field. + public const int LocationFieldNumber = 1; + private string location_ = ""; + /// + /// The location or region of the serving requests, e.g. "us-east1". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Location { + get { return location_; } + set { + location_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type type_ = global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified; + /// + /// The type of replica. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type Type { + get { return type_; } + set { + type_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReplicaSelection); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReplicaSelection other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Location != other.Location) return false; + if (Type != other.Type) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Location.Length != 0) hash ^= Location.GetHashCode(); + if (Type != global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified) hash ^= Type.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Location.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Location); + } + if (Type != global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Location.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Location); + } + if (Type != global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified) { + output.WriteRawTag(16); + output.WriteEnum((int) Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Location.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Location); + } + if (Type != global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReplicaSelection other) { + if (other == null) { + return; + } + if (other.Location.Length != 0) { + Location = other.Location; + } + if (other.Type != global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type.Unspecified) { + Type = other.Type; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Location = input.ReadString(); + break; + } + case 16: { + Type = (global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Location = input.ReadString(); + break; + } + case 16: { + Type = (global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Types.Type) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ReplicaSelection message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Indicates the type of replica. + /// + public enum Type { + /// + /// Not specified. + /// + [pbr::OriginalName("TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Read-write replicas support both reads and writes. + /// + [pbr::OriginalName("READ_WRITE")] ReadWrite = 1, + /// + /// Read-only replicas only support reads (not writes). + /// + [pbr::OriginalName("READ_ONLY")] ReadOnly = 2, + } + + } + #endregion + + } + + /// + /// An IncludeReplicas contains a repeated set of ReplicaSelection which + /// indicates the order in which replicas should be considered. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class IncludeReplicas : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IncludeReplicas()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.DirectedReadOptions.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IncludeReplicas() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IncludeReplicas(IncludeReplicas other) : this() { + replicaSelections_ = other.replicaSelections_.Clone(); + autoFailoverDisabled_ = other.autoFailoverDisabled_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IncludeReplicas Clone() { + return new IncludeReplicas(this); + } + + /// Field number for the "replica_selections" field. + public const int ReplicaSelectionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_replicaSelections_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Parser); + private readonly pbc::RepeatedField replicaSelections_ = new pbc::RepeatedField(); + /// + /// The directed read replica selector. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReplicaSelections { + get { return replicaSelections_; } + } + + /// Field number for the "auto_failover_disabled" field. + public const int AutoFailoverDisabledFieldNumber = 2; + private bool autoFailoverDisabled_; + /// + /// If true, Spanner will not route requests to a replica outside the + /// include_replicas list when all of the specified replicas are unavailable + /// or unhealthy. Default value is `false`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AutoFailoverDisabled { + get { return autoFailoverDisabled_; } + set { + autoFailoverDisabled_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as IncludeReplicas); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(IncludeReplicas other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!replicaSelections_.Equals(other.replicaSelections_)) return false; + if (AutoFailoverDisabled != other.AutoFailoverDisabled) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= replicaSelections_.GetHashCode(); + if (AutoFailoverDisabled != false) hash ^= AutoFailoverDisabled.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + replicaSelections_.WriteTo(output, _repeated_replicaSelections_codec); + if (AutoFailoverDisabled != false) { + output.WriteRawTag(16); + output.WriteBool(AutoFailoverDisabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + replicaSelections_.WriteTo(ref output, _repeated_replicaSelections_codec); + if (AutoFailoverDisabled != false) { + output.WriteRawTag(16); + output.WriteBool(AutoFailoverDisabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += replicaSelections_.CalculateSize(_repeated_replicaSelections_codec); + if (AutoFailoverDisabled != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(IncludeReplicas other) { + if (other == null) { + return; + } + replicaSelections_.Add(other.replicaSelections_); + if (other.AutoFailoverDisabled != false) { + AutoFailoverDisabled = other.AutoFailoverDisabled; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + replicaSelections_.AddEntriesFrom(input, _repeated_replicaSelections_codec); + break; + } + case 16: { + AutoFailoverDisabled = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + replicaSelections_.AddEntriesFrom(ref input, _repeated_replicaSelections_codec); + break; + } + case 16: { + AutoFailoverDisabled = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// An ExcludeReplicas contains a repeated set of ReplicaSelection that should + /// be excluded from serving requests. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExcludeReplicas : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExcludeReplicas()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.DirectedReadOptions.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExcludeReplicas() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExcludeReplicas(ExcludeReplicas other) : this() { + replicaSelections_ = other.replicaSelections_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExcludeReplicas Clone() { + return new ExcludeReplicas(this); + } + + /// Field number for the "replica_selections" field. + public const int ReplicaSelectionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_replicaSelections_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.DirectedReadOptions.Types.ReplicaSelection.Parser); + private readonly pbc::RepeatedField replicaSelections_ = new pbc::RepeatedField(); + /// + /// The directed read replica selector. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReplicaSelections { + get { return replicaSelections_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExcludeReplicas); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExcludeReplicas other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!replicaSelections_.Equals(other.replicaSelections_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= replicaSelections_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + replicaSelections_.WriteTo(output, _repeated_replicaSelections_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + replicaSelections_.WriteTo(ref output, _repeated_replicaSelections_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += replicaSelections_.CalculateSize(_repeated_replicaSelections_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExcludeReplicas other) { + if (other == null) { + return; + } + replicaSelections_.Add(other.replicaSelections_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + replicaSelections_.AddEntriesFrom(input, _repeated_replicaSelections_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + replicaSelections_.AddEntriesFrom(ref input, _repeated_replicaSelections_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and + /// [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExecuteSqlRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExecuteSqlRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteSqlRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteSqlRequest(ExecuteSqlRequest other) : this() { + session_ = other.session_; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + sql_ = other.sql_; + params_ = other.params_ != null ? other.params_.Clone() : null; + paramTypes_ = other.paramTypes_.Clone(); + resumeToken_ = other.resumeToken_; + queryMode_ = other.queryMode_; + partitionToken_ = other.partitionToken_; + seqno_ = other.seqno_; + queryOptions_ = other.queryOptions_ != null ? other.queryOptions_.Clone() : null; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + directedReadOptions_ = other.directedReadOptions_ != null ? other.directedReadOptions_.Clone() : null; + dataBoostEnabled_ = other.dataBoostEnabled_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteSqlRequest Clone() { + return new ExecuteSqlRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the SQL query should be performed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionSelector transaction_; + /// + /// The transaction to use. + /// + /// For queries, if none is provided, the default is a temporary read-only + /// transaction with strong concurrency. + /// + /// Standard DML statements require a read-write transaction. To protect + /// against replays, single-use transactions are not supported. The caller + /// must either supply an existing transaction ID or begin a new transaction. + /// + /// Partitioned DML requires an existing Partitioned DML transaction ID. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionSelector Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "sql" field. + public const int SqlFieldNumber = 3; + private string sql_ = ""; + /// + /// Required. The SQL string. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Sql { + get { return sql_; } + set { + sql_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "params" field. + public const int ParamsFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.Struct params_; + /// + /// Parameter names and values that bind to placeholders in the SQL string. + /// + /// A parameter placeholder consists of the `@` character followed by the + /// parameter name (for example, `@firstName`). Parameter names must conform + /// to the naming requirements of identifiers as specified at + /// https://cloud.google.com/spanner/docs/lexical#identifiers. + /// + /// Parameters can appear anywhere that a literal value is expected. The same + /// parameter name can be used more than once, for example: + /// + /// `"WHERE id > @msg_id AND id < @msg_id + 100"` + /// + /// It is an error to execute a SQL statement with unbound parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Params { + get { return params_; } + set { + params_ = value; + } + } + + /// Field number for the "param_types" field. + public const int ParamTypesFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_paramTypes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Spanner.V1.Type.Parser), 42); + private readonly pbc::MapField paramTypes_ = new pbc::MapField(); + /// + /// It is not always possible for Cloud Spanner to infer the right SQL type + /// from a JSON value. For example, values of type `BYTES` and values + /// of type `STRING` both appear in + /// [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. + /// + /// In these cases, `param_types` can be used to specify the exact + /// SQL type for some or all of the SQL statement parameters. See the + /// definition of [Type][google.spanner.v1.Type] for more information + /// about SQL types. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField ParamTypes { + get { return paramTypes_; } + } + + /// Field number for the "resume_token" field. + public const int ResumeTokenFieldNumber = 6; + private pb::ByteString resumeToken_ = pb::ByteString.Empty; + /// + /// If this request is resuming a previously interrupted SQL statement + /// execution, `resume_token` should be copied from the last + /// [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the + /// interruption. Doing this enables the new SQL statement execution to resume + /// where the last one left off. The rest of the request parameters must + /// exactly match the request that yielded this token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ResumeToken { + get { return resumeToken_; } + set { + resumeToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "query_mode" field. + public const int QueryModeFieldNumber = 7; + private global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode queryMode_ = global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal; + /// + /// Used to control the amount of debugging information returned in + /// [ResultSetStats][google.spanner.v1.ResultSetStats]. If + /// [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is + /// set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only + /// be set to + /// [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode QueryMode { + get { return queryMode_; } + set { + queryMode_ = value; + } + } + + /// Field number for the "partition_token" field. + public const int PartitionTokenFieldNumber = 8; + private pb::ByteString partitionToken_ = pb::ByteString.Empty; + /// + /// If present, results will be restricted to the specified partition + /// previously created using PartitionQuery(). There must be an exact + /// match for the values of fields common to this message and the + /// PartitionQueryRequest message used to create this partition_token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PartitionToken { + get { return partitionToken_; } + set { + partitionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "seqno" field. + public const int SeqnoFieldNumber = 9; + private long seqno_; + /// + /// A per-transaction sequence number used to identify this request. This field + /// makes each request idempotent such that if the request is received multiple + /// times, at most one will succeed. + /// + /// The sequence number must be monotonically increasing within the + /// transaction. If a request arrives for the first time with an out-of-order + /// sequence number, the transaction may be aborted. Replays of previously + /// handled requests will yield the same response as the first execution. + /// + /// Required for DML statements. Ignored for queries. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Seqno { + get { return seqno_; } + set { + seqno_ = value; + } + } + + /// Field number for the "query_options" field. + public const int QueryOptionsFieldNumber = 10; + private global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions queryOptions_; + /// + /// Query optimizer configuration to use for the given query. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions QueryOptions { + get { return queryOptions_; } + set { + queryOptions_ = value; + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 11; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + /// Field number for the "directed_read_options" field. + public const int DirectedReadOptionsFieldNumber = 15; + private global::Google.Cloud.Spanner.V1.DirectedReadOptions directedReadOptions_; + /// + /// Directed read options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.DirectedReadOptions DirectedReadOptions { + get { return directedReadOptions_; } + set { + directedReadOptions_ = value; + } + } + + /// Field number for the "data_boost_enabled" field. + public const int DataBoostEnabledFieldNumber = 16; + private bool dataBoostEnabled_; + /// + /// If this is for a partitioned query and this field is set to `true`, the + /// request is executed with Spanner Data Boost independent compute resources. + /// + /// If the field is set to `true` but the request does not set + /// `partition_token`, the API returns an `INVALID_ARGUMENT` error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DataBoostEnabled { + get { return dataBoostEnabled_; } + set { + dataBoostEnabled_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExecuteSqlRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExecuteSqlRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if (Sql != other.Sql) return false; + if (!object.Equals(Params, other.Params)) return false; + if (!ParamTypes.Equals(other.ParamTypes)) return false; + if (ResumeToken != other.ResumeToken) return false; + if (QueryMode != other.QueryMode) return false; + if (PartitionToken != other.PartitionToken) return false; + if (Seqno != other.Seqno) return false; + if (!object.Equals(QueryOptions, other.QueryOptions)) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + if (!object.Equals(DirectedReadOptions, other.DirectedReadOptions)) return false; + if (DataBoostEnabled != other.DataBoostEnabled) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (Sql.Length != 0) hash ^= Sql.GetHashCode(); + if (params_ != null) hash ^= Params.GetHashCode(); + hash ^= ParamTypes.GetHashCode(); + if (ResumeToken.Length != 0) hash ^= ResumeToken.GetHashCode(); + if (QueryMode != global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal) hash ^= QueryMode.GetHashCode(); + if (PartitionToken.Length != 0) hash ^= PartitionToken.GetHashCode(); + if (Seqno != 0L) hash ^= Seqno.GetHashCode(); + if (queryOptions_ != null) hash ^= QueryOptions.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + if (directedReadOptions_ != null) hash ^= DirectedReadOptions.GetHashCode(); + if (DataBoostEnabled != false) hash ^= DataBoostEnabled.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Sql.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(output, _map_paramTypes_codec); + if (ResumeToken.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(ResumeToken); + } + if (QueryMode != global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal) { + output.WriteRawTag(56); + output.WriteEnum((int) QueryMode); + } + if (PartitionToken.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(PartitionToken); + } + if (Seqno != 0L) { + output.WriteRawTag(72); + output.WriteInt64(Seqno); + } + if (queryOptions_ != null) { + output.WriteRawTag(82); + output.WriteMessage(QueryOptions); + } + if (requestOptions_ != null) { + output.WriteRawTag(90); + output.WriteMessage(RequestOptions); + } + if (directedReadOptions_ != null) { + output.WriteRawTag(122); + output.WriteMessage(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + output.WriteRawTag(128, 1); + output.WriteBool(DataBoostEnabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Sql.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(ref output, _map_paramTypes_codec); + if (ResumeToken.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(ResumeToken); + } + if (QueryMode != global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal) { + output.WriteRawTag(56); + output.WriteEnum((int) QueryMode); + } + if (PartitionToken.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(PartitionToken); + } + if (Seqno != 0L) { + output.WriteRawTag(72); + output.WriteInt64(Seqno); + } + if (queryOptions_ != null) { + output.WriteRawTag(82); + output.WriteMessage(QueryOptions); + } + if (requestOptions_ != null) { + output.WriteRawTag(90); + output.WriteMessage(RequestOptions); + } + if (directedReadOptions_ != null) { + output.WriteRawTag(122); + output.WriteMessage(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + output.WriteRawTag(128, 1); + output.WriteBool(DataBoostEnabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (Sql.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Sql); + } + if (params_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params); + } + size += paramTypes_.CalculateSize(_map_paramTypes_codec); + if (ResumeToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ResumeToken); + } + if (QueryMode != global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) QueryMode); + } + if (PartitionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PartitionToken); + } + if (Seqno != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seqno); + } + if (queryOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryOptions); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + if (directedReadOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + size += 2 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExecuteSqlRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + Transaction.MergeFrom(other.Transaction); + } + if (other.Sql.Length != 0) { + Sql = other.Sql; + } + if (other.params_ != null) { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Params.MergeFrom(other.Params); + } + paramTypes_.MergeFrom(other.paramTypes_); + if (other.ResumeToken.Length != 0) { + ResumeToken = other.ResumeToken; + } + if (other.QueryMode != global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode.Normal) { + QueryMode = other.QueryMode; + } + if (other.PartitionToken.Length != 0) { + PartitionToken = other.PartitionToken; + } + if (other.Seqno != 0L) { + Seqno = other.Seqno; + } + if (other.queryOptions_ != null) { + if (queryOptions_ == null) { + QueryOptions = new global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions(); + } + QueryOptions.MergeFrom(other.QueryOptions); + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + if (other.directedReadOptions_ != null) { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + DirectedReadOptions.MergeFrom(other.DirectedReadOptions); + } + if (other.DataBoostEnabled != false) { + DataBoostEnabled = other.DataBoostEnabled; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Sql = input.ReadString(); + break; + } + case 34: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 42: { + paramTypes_.AddEntriesFrom(input, _map_paramTypes_codec); + break; + } + case 50: { + ResumeToken = input.ReadBytes(); + break; + } + case 56: { + QueryMode = (global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode) input.ReadEnum(); + break; + } + case 66: { + PartitionToken = input.ReadBytes(); + break; + } + case 72: { + Seqno = input.ReadInt64(); + break; + } + case 82: { + if (queryOptions_ == null) { + QueryOptions = new global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions(); + } + input.ReadMessage(QueryOptions); + break; + } + case 90: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 122: { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + input.ReadMessage(DirectedReadOptions); + break; + } + case 128: { + DataBoostEnabled = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Sql = input.ReadString(); + break; + } + case 34: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 42: { + paramTypes_.AddEntriesFrom(ref input, _map_paramTypes_codec); + break; + } + case 50: { + ResumeToken = input.ReadBytes(); + break; + } + case 56: { + QueryMode = (global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryMode) input.ReadEnum(); + break; + } + case 66: { + PartitionToken = input.ReadBytes(); + break; + } + case 72: { + Seqno = input.ReadInt64(); + break; + } + case 82: { + if (queryOptions_ == null) { + QueryOptions = new global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Types.QueryOptions(); + } + input.ReadMessage(QueryOptions); + break; + } + case 90: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 122: { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + input.ReadMessage(DirectedReadOptions); + break; + } + case 128: { + DataBoostEnabled = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ExecuteSqlRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Mode in which the statement must be processed. + /// + public enum QueryMode { + /// + /// The default mode. Only the statement results are returned. + /// + [pbr::OriginalName("NORMAL")] Normal = 0, + /// + /// This mode returns only the query plan, without any results or + /// execution statistics information. + /// + [pbr::OriginalName("PLAN")] Plan = 1, + /// + /// This mode returns both the query plan and the execution statistics along + /// with the results. + /// + [pbr::OriginalName("PROFILE")] Profile = 2, + } + + /// + /// Query optimizer configuration. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class QueryOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryOptions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryOptions(QueryOptions other) : this() { + optimizerVersion_ = other.optimizerVersion_; + optimizerStatisticsPackage_ = other.optimizerStatisticsPackage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryOptions Clone() { + return new QueryOptions(this); + } + + /// Field number for the "optimizer_version" field. + public const int OptimizerVersionFieldNumber = 1; + private string optimizerVersion_ = ""; + /// + /// An option to control the selection of optimizer version. + /// + /// This parameter allows individual queries to pick different query + /// optimizer versions. + /// + /// Specifying `latest` as a value instructs Cloud Spanner to use the + /// latest supported query optimizer version. If not specified, Cloud Spanner + /// uses the optimizer version set at the database level options. Any other + /// positive integer (from the list of supported optimizer versions) + /// overrides the default optimizer version for query execution. + /// + /// The list of supported optimizer versions can be queried from + /// SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. + /// + /// Executing a SQL statement with an invalid optimizer version fails with + /// an `INVALID_ARGUMENT` error. + /// + /// See + /// https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + /// for more information on managing the query optimizer. + /// + /// The `optimizer_version` statement hint has precedence over this setting. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OptimizerVersion { + get { return optimizerVersion_; } + set { + optimizerVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "optimizer_statistics_package" field. + public const int OptimizerStatisticsPackageFieldNumber = 2; + private string optimizerStatisticsPackage_ = ""; + /// + /// An option to control the selection of optimizer statistics package. + /// + /// This parameter allows individual queries to use a different query + /// optimizer statistics package. + /// + /// Specifying `latest` as a value instructs Cloud Spanner to use the latest + /// generated statistics package. If not specified, Cloud Spanner uses + /// the statistics package set at the database level options, or the latest + /// package if the database option is not set. + /// + /// The statistics package requested by the query has to be exempt from + /// garbage collection. This can be achieved with the following DDL + /// statement: + /// + /// ``` + /// ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false) + /// ``` + /// + /// The list of available statistics packages can be queried from + /// `INFORMATION_SCHEMA.SPANNER_STATISTICS`. + /// + /// Executing a SQL statement with an invalid optimizer statistics package + /// or with a statistics package that allows garbage collection fails with + /// an `INVALID_ARGUMENT` error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OptimizerStatisticsPackage { + get { return optimizerStatisticsPackage_; } + set { + optimizerStatisticsPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as QueryOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(QueryOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (OptimizerVersion != other.OptimizerVersion) return false; + if (OptimizerStatisticsPackage != other.OptimizerStatisticsPackage) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (OptimizerVersion.Length != 0) hash ^= OptimizerVersion.GetHashCode(); + if (OptimizerStatisticsPackage.Length != 0) hash ^= OptimizerStatisticsPackage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (OptimizerVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(OptimizerVersion); + } + if (OptimizerStatisticsPackage.Length != 0) { + output.WriteRawTag(18); + output.WriteString(OptimizerStatisticsPackage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (OptimizerVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(OptimizerVersion); + } + if (OptimizerStatisticsPackage.Length != 0) { + output.WriteRawTag(18); + output.WriteString(OptimizerStatisticsPackage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (OptimizerVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OptimizerVersion); + } + if (OptimizerStatisticsPackage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OptimizerStatisticsPackage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(QueryOptions other) { + if (other == null) { + return; + } + if (other.OptimizerVersion.Length != 0) { + OptimizerVersion = other.OptimizerVersion; + } + if (other.OptimizerStatisticsPackage.Length != 0) { + OptimizerStatisticsPackage = other.OptimizerStatisticsPackage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + OptimizerVersion = input.ReadString(); + break; + } + case 18: { + OptimizerStatisticsPackage = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + OptimizerVersion = input.ReadString(); + break; + } + case 18: { + OptimizerStatisticsPackage = input.ReadString(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExecuteBatchDmlRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExecuteBatchDmlRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlRequest(ExecuteBatchDmlRequest other) : this() { + session_ = other.session_; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + statements_ = other.statements_.Clone(); + seqno_ = other.seqno_; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlRequest Clone() { + return new ExecuteBatchDmlRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the DML statements should be performed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionSelector transaction_; + /// + /// Required. The transaction to use. Must be a read-write transaction. + /// + /// To protect against replays, single-use transactions are not supported. The + /// caller must either supply an existing transaction ID or begin a new + /// transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionSelector Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "statements" field. + public const int StatementsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_statements_codec + = pb::FieldCodec.ForMessage(26, global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement.Parser); + private readonly pbc::RepeatedField statements_ = new pbc::RepeatedField(); + /// + /// Required. The list of statements to execute in this batch. Statements are + /// executed serially, such that the effects of statement `i` are visible to + /// statement `i+1`. Each statement must be a DML statement. Execution stops at + /// the first failed statement; the remaining statements are not executed. + /// + /// Callers must provide at least one statement. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Statements { + get { return statements_; } + } + + /// Field number for the "seqno" field. + public const int SeqnoFieldNumber = 4; + private long seqno_; + /// + /// Required. A per-transaction sequence number used to identify this request. + /// This field makes each request idempotent such that if the request is + /// received multiple times, at most one will succeed. + /// + /// The sequence number must be monotonically increasing within the + /// transaction. If a request arrives for the first time with an out-of-order + /// sequence number, the transaction may be aborted. Replays of previously + /// handled requests will yield the same response as the first execution. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Seqno { + get { return seqno_; } + set { + seqno_ = value; + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 5; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExecuteBatchDmlRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExecuteBatchDmlRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if(!statements_.Equals(other.statements_)) return false; + if (Seqno != other.Seqno) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + hash ^= statements_.GetHashCode(); + if (Seqno != 0L) hash ^= Seqno.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + statements_.WriteTo(output, _repeated_statements_codec); + if (Seqno != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Seqno); + } + if (requestOptions_ != null) { + output.WriteRawTag(42); + output.WriteMessage(RequestOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + statements_.WriteTo(ref output, _repeated_statements_codec); + if (Seqno != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Seqno); + } + if (requestOptions_ != null) { + output.WriteRawTag(42); + output.WriteMessage(RequestOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + size += statements_.CalculateSize(_repeated_statements_codec); + if (Seqno != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seqno); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExecuteBatchDmlRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + Transaction.MergeFrom(other.Transaction); + } + statements_.Add(other.statements_); + if (other.Seqno != 0L) { + Seqno = other.Seqno; + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + statements_.AddEntriesFrom(input, _repeated_statements_codec); + break; + } + case 32: { + Seqno = input.ReadInt64(); + break; + } + case 42: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + statements_.AddEntriesFrom(ref input, _repeated_statements_codec); + break; + } + case 32: { + Seqno = input.ReadInt64(); + break; + } + case 42: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ExecuteBatchDmlRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A single DML statement. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Statement : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Statement()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Statement() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Statement(Statement other) : this() { + sql_ = other.sql_; + params_ = other.params_ != null ? other.params_.Clone() : null; + paramTypes_ = other.paramTypes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Statement Clone() { + return new Statement(this); + } + + /// Field number for the "sql" field. + public const int SqlFieldNumber = 1; + private string sql_ = ""; + /// + /// Required. The DML string. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Sql { + get { return sql_; } + set { + sql_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "params" field. + public const int ParamsFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Struct params_; + /// + /// Parameter names and values that bind to placeholders in the DML string. + /// + /// A parameter placeholder consists of the `@` character followed by the + /// parameter name (for example, `@firstName`). Parameter names can contain + /// letters, numbers, and underscores. + /// + /// Parameters can appear anywhere that a literal value is expected. The + /// same parameter name can be used more than once, for example: + /// + /// `"WHERE id > @msg_id AND id < @msg_id + 100"` + /// + /// It is an error to execute a SQL statement with unbound parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Params { + get { return params_; } + set { + params_ = value; + } + } + + /// Field number for the "param_types" field. + public const int ParamTypesFieldNumber = 3; + private static readonly pbc::MapField.Codec _map_paramTypes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Spanner.V1.Type.Parser), 26); + private readonly pbc::MapField paramTypes_ = new pbc::MapField(); + /// + /// It is not always possible for Cloud Spanner to infer the right SQL type + /// from a JSON value. For example, values of type `BYTES` and values + /// of type `STRING` both appear in + /// [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as + /// JSON strings. + /// + /// In these cases, `param_types` can be used to specify the exact + /// SQL type for some or all of the SQL statement parameters. See the + /// definition of [Type][google.spanner.v1.Type] for more information + /// about SQL types. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField ParamTypes { + get { return paramTypes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Statement); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Statement other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Sql != other.Sql) return false; + if (!object.Equals(Params, other.Params)) return false; + if (!ParamTypes.Equals(other.ParamTypes)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Sql.Length != 0) hash ^= Sql.GetHashCode(); + if (params_ != null) hash ^= Params.GetHashCode(); + hash ^= ParamTypes.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Sql.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(output, _map_paramTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Sql.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(ref output, _map_paramTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Sql.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Sql); + } + if (params_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params); + } + size += paramTypes_.CalculateSize(_map_paramTypes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Statement other) { + if (other == null) { + return; + } + if (other.Sql.Length != 0) { + Sql = other.Sql; + } + if (other.params_ != null) { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Params.MergeFrom(other.Params); + } + paramTypes_.MergeFrom(other.paramTypes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Sql = input.ReadString(); + break; + } + case 18: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 26: { + paramTypes_.AddEntriesFrom(input, _map_paramTypes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Sql = input.ReadString(); + break; + } + case 18: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 26: { + paramTypes_.AddEntriesFrom(ref input, _map_paramTypes_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// The response for + /// [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list + /// of [ResultSet][google.spanner.v1.ResultSet] messages, one for each DML + /// statement that has successfully executed, in the same order as the statements + /// in the request. If a statement fails, the status in the response body + /// identifies the cause of the failure. + /// + /// To check for DML statements that failed, use the following approach: + /// + /// 1. Check the status in the response message. The + /// [google.rpc.Code][google.rpc.Code] enum + /// value `OK` indicates that all statements were executed successfully. + /// 2. If the status was not `OK`, check the number of result sets in the + /// response. If the response contains `N` + /// [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in + /// the request failed. + /// + /// Example 1: + /// + /// * Request: 5 DML statements, all executed successfully. + /// * Response: 5 [ResultSet][google.spanner.v1.ResultSet] messages, with the + /// status `OK`. + /// + /// Example 2: + /// + /// * Request: 5 DML statements. The third statement has a syntax error. + /// * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax + /// error (`INVALID_ARGUMENT`) + /// status. The number of [ResultSet][google.spanner.v1.ResultSet] messages + /// indicates that the third statement failed, and the fourth and fifth + /// statements were not executed. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ExecuteBatchDmlResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExecuteBatchDmlResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlResponse(ExecuteBatchDmlResponse other) : this() { + resultSets_ = other.resultSets_.Clone(); + status_ = other.status_ != null ? other.status_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExecuteBatchDmlResponse Clone() { + return new ExecuteBatchDmlResponse(this); + } + + /// Field number for the "result_sets" field. + public const int ResultSetsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_resultSets_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.ResultSet.Parser); + private readonly pbc::RepeatedField resultSets_ = new pbc::RepeatedField(); + /// + /// One [ResultSet][google.spanner.v1.ResultSet] for each statement in the + /// request that ran successfully, in the same order as the statements in the + /// request. Each [ResultSet][google.spanner.v1.ResultSet] does not contain any + /// rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each + /// [ResultSet][google.spanner.v1.ResultSet] contain the number of rows + /// modified by the statement. + /// + /// Only the first [ResultSet][google.spanner.v1.ResultSet] in the response + /// contains valid [ResultSetMetadata][google.spanner.v1.ResultSetMetadata]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ResultSets { + get { return resultSets_; } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Google.Rpc.Status status_; + /// + /// If all DML statements are executed successfully, the status is `OK`. + /// Otherwise, the error status of the first failed statement. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Rpc.Status Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExecuteBatchDmlResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExecuteBatchDmlResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!resultSets_.Equals(other.resultSets_)) return false; + if (!object.Equals(Status, other.Status)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= resultSets_.GetHashCode(); + if (status_ != null) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + resultSets_.WriteTo(output, _repeated_resultSets_codec); + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + resultSets_.WriteTo(ref output, _repeated_resultSets_codec); + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += resultSets_.CalculateSize(_repeated_resultSets_codec); + if (status_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExecuteBatchDmlResponse other) { + if (other == null) { + return; + } + resultSets_.Add(other.resultSets_); + if (other.status_ != null) { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + Status.MergeFrom(other.Status); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + resultSets_.AddEntriesFrom(input, _repeated_resultSets_codec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + input.ReadMessage(Status); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + resultSets_.AddEntriesFrom(ref input, _repeated_resultSets_codec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + input.ReadMessage(Status); + break; + } + } + } + } + #endif + + } + + /// + /// Options for a PartitionQueryRequest and + /// PartitionReadRequest. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartitionOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartitionOptions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionOptions(PartitionOptions other) : this() { + partitionSizeBytes_ = other.partitionSizeBytes_; + maxPartitions_ = other.maxPartitions_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionOptions Clone() { + return new PartitionOptions(this); + } + + /// Field number for the "partition_size_bytes" field. + public const int PartitionSizeBytesFieldNumber = 1; + private long partitionSizeBytes_; + /// + /// **Note:** This hint is currently ignored by PartitionQuery and + /// PartitionRead requests. + /// + /// The desired data size for each partition generated. The default for this + /// option is currently 1 GiB. This is only a hint. The actual size of each + /// partition may be smaller or larger than this size request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long PartitionSizeBytes { + get { return partitionSizeBytes_; } + set { + partitionSizeBytes_ = value; + } + } + + /// Field number for the "max_partitions" field. + public const int MaxPartitionsFieldNumber = 2; + private long maxPartitions_; + /// + /// **Note:** This hint is currently ignored by PartitionQuery and + /// PartitionRead requests. + /// + /// The desired maximum number of partitions to return. For example, this may + /// be set to the number of workers available. The default for this option + /// is currently 10,000. The maximum value is currently 200,000. This is only + /// a hint. The actual number of partitions returned may be smaller or larger + /// than this maximum count request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MaxPartitions { + get { return maxPartitions_; } + set { + maxPartitions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartitionOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartitionOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PartitionSizeBytes != other.PartitionSizeBytes) return false; + if (MaxPartitions != other.MaxPartitions) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PartitionSizeBytes != 0L) hash ^= PartitionSizeBytes.GetHashCode(); + if (MaxPartitions != 0L) hash ^= MaxPartitions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PartitionSizeBytes != 0L) { + output.WriteRawTag(8); + output.WriteInt64(PartitionSizeBytes); + } + if (MaxPartitions != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MaxPartitions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PartitionSizeBytes != 0L) { + output.WriteRawTag(8); + output.WriteInt64(PartitionSizeBytes); + } + if (MaxPartitions != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MaxPartitions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PartitionSizeBytes != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(PartitionSizeBytes); + } + if (MaxPartitions != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxPartitions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartitionOptions other) { + if (other == null) { + return; + } + if (other.PartitionSizeBytes != 0L) { + PartitionSizeBytes = other.PartitionSizeBytes; + } + if (other.MaxPartitions != 0L) { + MaxPartitions = other.MaxPartitions; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + PartitionSizeBytes = input.ReadInt64(); + break; + } + case 16: { + MaxPartitions = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + PartitionSizeBytes = input.ReadInt64(); + break; + } + case 16: { + MaxPartitions = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartitionQueryRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartitionQueryRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionQueryRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionQueryRequest(PartitionQueryRequest other) : this() { + session_ = other.session_; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + sql_ = other.sql_; + params_ = other.params_ != null ? other.params_.Clone() : null; + paramTypes_ = other.paramTypes_.Clone(); + partitionOptions_ = other.partitionOptions_ != null ? other.partitionOptions_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionQueryRequest Clone() { + return new PartitionQueryRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session used to create the partitions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionSelector transaction_; + /// + /// Read only snapshot transactions are supported, read/write and single use + /// transactions are not. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionSelector Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "sql" field. + public const int SqlFieldNumber = 3; + private string sql_ = ""; + /// + /// Required. The query request to generate partitions for. The request will + /// fail if the query is not root partitionable. For a query to be root + /// partitionable, it needs to satisfy a few conditions. For example, if the + /// query execution plan contains a distributed union operator, then it must be + /// the first operator in the plan. For more information about other + /// conditions, see [Read data in + /// parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). + /// + /// The query request must not contain DML commands, such as INSERT, UPDATE, or + /// DELETE. Use + /// [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a + /// PartitionedDml transaction for large, partition-friendly DML operations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Sql { + get { return sql_; } + set { + sql_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "params" field. + public const int ParamsFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.Struct params_; + /// + /// Parameter names and values that bind to placeholders in the SQL string. + /// + /// A parameter placeholder consists of the `@` character followed by the + /// parameter name (for example, `@firstName`). Parameter names can contain + /// letters, numbers, and underscores. + /// + /// Parameters can appear anywhere that a literal value is expected. The same + /// parameter name can be used more than once, for example: + /// + /// `"WHERE id > @msg_id AND id < @msg_id + 100"` + /// + /// It is an error to execute a SQL statement with unbound parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Params { + get { return params_; } + set { + params_ = value; + } + } + + /// Field number for the "param_types" field. + public const int ParamTypesFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_paramTypes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Spanner.V1.Type.Parser), 42); + private readonly pbc::MapField paramTypes_ = new pbc::MapField(); + /// + /// It is not always possible for Cloud Spanner to infer the right SQL type + /// from a JSON value. For example, values of type `BYTES` and values + /// of type `STRING` both appear in + /// [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. + /// + /// In these cases, `param_types` can be used to specify the exact + /// SQL type for some or all of the SQL query parameters. See the + /// definition of [Type][google.spanner.v1.Type] for more information + /// about SQL types. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField ParamTypes { + get { return paramTypes_; } + } + + /// Field number for the "partition_options" field. + public const int PartitionOptionsFieldNumber = 6; + private global::Google.Cloud.Spanner.V1.PartitionOptions partitionOptions_; + /// + /// Additional options that affect how many partitions are created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.PartitionOptions PartitionOptions { + get { return partitionOptions_; } + set { + partitionOptions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartitionQueryRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartitionQueryRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if (Sql != other.Sql) return false; + if (!object.Equals(Params, other.Params)) return false; + if (!ParamTypes.Equals(other.ParamTypes)) return false; + if (!object.Equals(PartitionOptions, other.PartitionOptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (Sql.Length != 0) hash ^= Sql.GetHashCode(); + if (params_ != null) hash ^= Params.GetHashCode(); + hash ^= ParamTypes.GetHashCode(); + if (partitionOptions_ != null) hash ^= PartitionOptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Sql.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(output, _map_paramTypes_codec); + if (partitionOptions_ != null) { + output.WriteRawTag(50); + output.WriteMessage(PartitionOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Sql.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Sql); + } + if (params_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Params); + } + paramTypes_.WriteTo(ref output, _map_paramTypes_codec); + if (partitionOptions_ != null) { + output.WriteRawTag(50); + output.WriteMessage(PartitionOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (Sql.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Sql); + } + if (params_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params); + } + size += paramTypes_.CalculateSize(_map_paramTypes_codec); + if (partitionOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PartitionOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartitionQueryRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + Transaction.MergeFrom(other.Transaction); + } + if (other.Sql.Length != 0) { + Sql = other.Sql; + } + if (other.params_ != null) { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Params.MergeFrom(other.Params); + } + paramTypes_.MergeFrom(other.paramTypes_); + if (other.partitionOptions_ != null) { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + PartitionOptions.MergeFrom(other.PartitionOptions); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Sql = input.ReadString(); + break; + } + case 34: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 42: { + paramTypes_.AddEntriesFrom(input, _map_paramTypes_codec); + break; + } + case 50: { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + input.ReadMessage(PartitionOptions); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Sql = input.ReadString(); + break; + } + case 34: { + if (params_ == null) { + Params = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Params); + break; + } + case 42: { + paramTypes_.AddEntriesFrom(ref input, _map_paramTypes_codec); + break; + } + case 50: { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + input.ReadMessage(PartitionOptions); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead] + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartitionReadRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartitionReadRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionReadRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionReadRequest(PartitionReadRequest other) : this() { + session_ = other.session_; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + table_ = other.table_; + index_ = other.index_; + columns_ = other.columns_.Clone(); + keySet_ = other.keySet_ != null ? other.keySet_.Clone() : null; + partitionOptions_ = other.partitionOptions_ != null ? other.partitionOptions_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionReadRequest Clone() { + return new PartitionReadRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session used to create the partitions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionSelector transaction_; + /// + /// Read only snapshot transactions are supported, read/write and single use + /// transactions are not. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionSelector Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "table" field. + public const int TableFieldNumber = 3; + private string table_ = ""; + /// + /// Required. The name of the table in the database to be read. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Table { + get { return table_; } + set { + table_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "index" field. + public const int IndexFieldNumber = 4; + private string index_ = ""; + /// + /// If non-empty, the name of an index on + /// [table][google.spanner.v1.PartitionReadRequest.table]. This index is used + /// instead of the table primary key when interpreting + /// [key_set][google.spanner.v1.PartitionReadRequest.key_set] and sorting + /// result rows. See [key_set][google.spanner.v1.PartitionReadRequest.key_set] + /// for further information. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Index { + get { return index_; } + set { + index_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "columns" field. + public const int ColumnsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_columns_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField columns_ = new pbc::RepeatedField(); + /// + /// The columns of [table][google.spanner.v1.PartitionReadRequest.table] to be + /// returned for each row matching this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Columns { + get { return columns_; } + } + + /// Field number for the "key_set" field. + public const int KeySetFieldNumber = 6; + private global::Google.Cloud.Spanner.V1.KeySet keySet_; + /// + /// Required. `key_set` identifies the rows to be yielded. `key_set` names the + /// primary keys of the rows in + /// [table][google.spanner.v1.PartitionReadRequest.table] to be yielded, unless + /// [index][google.spanner.v1.PartitionReadRequest.index] is present. If + /// [index][google.spanner.v1.PartitionReadRequest.index] is present, then + /// [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names + /// index keys in [index][google.spanner.v1.PartitionReadRequest.index]. + /// + /// It is not an error for the `key_set` to name rows that do not + /// exist in the database. Read yields nothing for nonexistent rows. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.KeySet KeySet { + get { return keySet_; } + set { + keySet_ = value; + } + } + + /// Field number for the "partition_options" field. + public const int PartitionOptionsFieldNumber = 9; + private global::Google.Cloud.Spanner.V1.PartitionOptions partitionOptions_; + /// + /// Additional options that affect how many partitions are created. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.PartitionOptions PartitionOptions { + get { return partitionOptions_; } + set { + partitionOptions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartitionReadRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartitionReadRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if (Table != other.Table) return false; + if (Index != other.Index) return false; + if(!columns_.Equals(other.columns_)) return false; + if (!object.Equals(KeySet, other.KeySet)) return false; + if (!object.Equals(PartitionOptions, other.PartitionOptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (Table.Length != 0) hash ^= Table.GetHashCode(); + if (Index.Length != 0) hash ^= Index.GetHashCode(); + hash ^= columns_.GetHashCode(); + if (keySet_ != null) hash ^= KeySet.GetHashCode(); + if (partitionOptions_ != null) hash ^= PartitionOptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Table.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Table); + } + if (Index.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Index); + } + columns_.WriteTo(output, _repeated_columns_codec); + if (keySet_ != null) { + output.WriteRawTag(50); + output.WriteMessage(KeySet); + } + if (partitionOptions_ != null) { + output.WriteRawTag(74); + output.WriteMessage(PartitionOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Table.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Table); + } + if (Index.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Index); + } + columns_.WriteTo(ref output, _repeated_columns_codec); + if (keySet_ != null) { + output.WriteRawTag(50); + output.WriteMessage(KeySet); + } + if (partitionOptions_ != null) { + output.WriteRawTag(74); + output.WriteMessage(PartitionOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (Table.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Table); + } + if (Index.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Index); + } + size += columns_.CalculateSize(_repeated_columns_codec); + if (keySet_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(KeySet); + } + if (partitionOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PartitionOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartitionReadRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + Transaction.MergeFrom(other.Transaction); + } + if (other.Table.Length != 0) { + Table = other.Table; + } + if (other.Index.Length != 0) { + Index = other.Index; + } + columns_.Add(other.columns_); + if (other.keySet_ != null) { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + KeySet.MergeFrom(other.KeySet); + } + if (other.partitionOptions_ != null) { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + PartitionOptions.MergeFrom(other.PartitionOptions); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Table = input.ReadString(); + break; + } + case 34: { + Index = input.ReadString(); + break; + } + case 42: { + columns_.AddEntriesFrom(input, _repeated_columns_codec); + break; + } + case 50: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + case 74: { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + input.ReadMessage(PartitionOptions); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Table = input.ReadString(); + break; + } + case 34: { + Index = input.ReadString(); + break; + } + case 42: { + columns_.AddEntriesFrom(ref input, _repeated_columns_codec); + break; + } + case 50: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + case 74: { + if (partitionOptions_ == null) { + PartitionOptions = new global::Google.Cloud.Spanner.V1.PartitionOptions(); + } + input.ReadMessage(PartitionOptions); + break; + } + } + } + } + #endif + + } + + /// + /// Information returned for each partition returned in a + /// PartitionResponse. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Partition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Partition()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Partition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Partition(Partition other) : this() { + partitionToken_ = other.partitionToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Partition Clone() { + return new Partition(this); + } + + /// Field number for the "partition_token" field. + public const int PartitionTokenFieldNumber = 1; + private pb::ByteString partitionToken_ = pb::ByteString.Empty; + /// + /// This token can be passed to Read, StreamingRead, ExecuteSql, or + /// ExecuteStreamingSql requests to restrict the results to those identified by + /// this partition token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PartitionToken { + get { return partitionToken_; } + set { + partitionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Partition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Partition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PartitionToken != other.PartitionToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PartitionToken.Length != 0) hash ^= PartitionToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PartitionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(PartitionToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PartitionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(PartitionToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PartitionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PartitionToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Partition other) { + if (other == null) { + return; + } + if (other.PartitionToken.Length != 0) { + PartitionToken = other.PartitionToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + PartitionToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + PartitionToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + /// + /// The response for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] + /// or [PartitionRead][google.spanner.v1.Spanner.PartitionRead] + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartitionResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartitionResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionResponse(PartitionResponse other) : this() { + partitions_ = other.partitions_.Clone(); + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionResponse Clone() { + return new PartitionResponse(this); + } + + /// Field number for the "partitions" field. + public const int PartitionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_partitions_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.Partition.Parser); + private readonly pbc::RepeatedField partitions_ = new pbc::RepeatedField(); + /// + /// Partitions created by this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Partitions { + get { return partitions_; } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Transaction transaction_; + /// + /// Transaction created by this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Transaction Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartitionResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartitionResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!partitions_.Equals(other.partitions_)) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= partitions_.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + partitions_.WriteTo(output, _repeated_partitions_codec); + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + partitions_.WriteTo(ref output, _repeated_partitions_codec); + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += partitions_.CalculateSize(_repeated_partitions_codec); + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartitionResponse other) { + if (other == null) { + return; + } + partitions_.Add(other.partitions_); + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + Transaction.MergeFrom(other.Transaction); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + partitions_.AddEntriesFrom(input, _repeated_partitions_codec); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + input.ReadMessage(Transaction); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + partitions_.AddEntriesFrom(ref input, _repeated_partitions_codec); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.Transaction(); + } + input.ReadMessage(Transaction); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [Read][google.spanner.v1.Spanner.Read] and + /// [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReadRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReadRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadRequest(ReadRequest other) : this() { + session_ = other.session_; + transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null; + table_ = other.table_; + index_ = other.index_; + columns_ = other.columns_.Clone(); + keySet_ = other.keySet_ != null ? other.keySet_.Clone() : null; + limit_ = other.limit_; + resumeToken_ = other.resumeToken_; + partitionToken_ = other.partitionToken_; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + directedReadOptions_ = other.directedReadOptions_ != null ? other.directedReadOptions_.Clone() : null; + dataBoostEnabled_ = other.dataBoostEnabled_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadRequest Clone() { + return new ReadRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the read should be performed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction" field. + public const int TransactionFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionSelector transaction_; + /// + /// The transaction to use. If none is provided, the default is a + /// temporary read-only transaction with strong concurrency. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionSelector Transaction { + get { return transaction_; } + set { + transaction_ = value; + } + } + + /// Field number for the "table" field. + public const int TableFieldNumber = 3; + private string table_ = ""; + /// + /// Required. The name of the table in the database to be read. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Table { + get { return table_; } + set { + table_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "index" field. + public const int IndexFieldNumber = 4; + private string index_ = ""; + /// + /// If non-empty, the name of an index on + /// [table][google.spanner.v1.ReadRequest.table]. This index is used instead of + /// the table primary key when interpreting + /// [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows. + /// See [key_set][google.spanner.v1.ReadRequest.key_set] for further + /// information. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Index { + get { return index_; } + set { + index_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "columns" field. + public const int ColumnsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_columns_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField columns_ = new pbc::RepeatedField(); + /// + /// Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be + /// returned for each row matching this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Columns { + get { return columns_; } + } + + /// Field number for the "key_set" field. + public const int KeySetFieldNumber = 6; + private global::Google.Cloud.Spanner.V1.KeySet keySet_; + /// + /// Required. `key_set` identifies the rows to be yielded. `key_set` names the + /// primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to + /// be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present. + /// If [index][google.spanner.v1.ReadRequest.index] is present, then + /// [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys + /// in [index][google.spanner.v1.ReadRequest.index]. + /// + /// If the [partition_token][google.spanner.v1.ReadRequest.partition_token] + /// field is empty, rows are yielded in table primary key order (if + /// [index][google.spanner.v1.ReadRequest.index] is empty) or index key order + /// (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the + /// [partition_token][google.spanner.v1.ReadRequest.partition_token] field is + /// not empty, rows will be yielded in an unspecified order. + /// + /// It is not an error for the `key_set` to name rows that do not + /// exist in the database. Read yields nothing for nonexistent rows. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.KeySet KeySet { + get { return keySet_; } + set { + keySet_ = value; + } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 8; + private long limit_; + /// + /// If greater than zero, only the first `limit` rows are yielded. If `limit` + /// is zero, the default is no limit. A limit cannot be specified if + /// `partition_token` is set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Limit { + get { return limit_; } + set { + limit_ = value; + } + } + + /// Field number for the "resume_token" field. + public const int ResumeTokenFieldNumber = 9; + private pb::ByteString resumeToken_ = pb::ByteString.Empty; + /// + /// If this request is resuming a previously interrupted read, + /// `resume_token` should be copied from the last + /// [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the + /// interruption. Doing this enables the new read to resume where the last read + /// left off. The rest of the request parameters must exactly match the request + /// that yielded this token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ResumeToken { + get { return resumeToken_; } + set { + resumeToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "partition_token" field. + public const int PartitionTokenFieldNumber = 10; + private pb::ByteString partitionToken_ = pb::ByteString.Empty; + /// + /// If present, results will be restricted to the specified partition + /// previously created using PartitionRead(). There must be an exact + /// match for the values of fields common to this message and the + /// PartitionReadRequest message used to create this partition_token. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PartitionToken { + get { return partitionToken_; } + set { + partitionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 11; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + /// Field number for the "directed_read_options" field. + public const int DirectedReadOptionsFieldNumber = 14; + private global::Google.Cloud.Spanner.V1.DirectedReadOptions directedReadOptions_; + /// + /// Directed read options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.DirectedReadOptions DirectedReadOptions { + get { return directedReadOptions_; } + set { + directedReadOptions_ = value; + } + } + + /// Field number for the "data_boost_enabled" field. + public const int DataBoostEnabledFieldNumber = 15; + private bool dataBoostEnabled_; + /// + /// If this is for a partitioned read and this field is set to `true`, the + /// request is executed with Spanner Data Boost independent compute resources. + /// + /// If the field is set to `true` but the request does not set + /// `partition_token`, the API returns an `INVALID_ARGUMENT` error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DataBoostEnabled { + get { return dataBoostEnabled_; } + set { + dataBoostEnabled_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReadRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReadRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Transaction, other.Transaction)) return false; + if (Table != other.Table) return false; + if (Index != other.Index) return false; + if(!columns_.Equals(other.columns_)) return false; + if (!object.Equals(KeySet, other.KeySet)) return false; + if (Limit != other.Limit) return false; + if (ResumeToken != other.ResumeToken) return false; + if (PartitionToken != other.PartitionToken) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + if (!object.Equals(DirectedReadOptions, other.DirectedReadOptions)) return false; + if (DataBoostEnabled != other.DataBoostEnabled) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (transaction_ != null) hash ^= Transaction.GetHashCode(); + if (Table.Length != 0) hash ^= Table.GetHashCode(); + if (Index.Length != 0) hash ^= Index.GetHashCode(); + hash ^= columns_.GetHashCode(); + if (keySet_ != null) hash ^= KeySet.GetHashCode(); + if (Limit != 0L) hash ^= Limit.GetHashCode(); + if (ResumeToken.Length != 0) hash ^= ResumeToken.GetHashCode(); + if (PartitionToken.Length != 0) hash ^= PartitionToken.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + if (directedReadOptions_ != null) hash ^= DirectedReadOptions.GetHashCode(); + if (DataBoostEnabled != false) hash ^= DataBoostEnabled.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Table.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Table); + } + if (Index.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Index); + } + columns_.WriteTo(output, _repeated_columns_codec); + if (keySet_ != null) { + output.WriteRawTag(50); + output.WriteMessage(KeySet); + } + if (Limit != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Limit); + } + if (ResumeToken.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(ResumeToken); + } + if (PartitionToken.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(PartitionToken); + } + if (requestOptions_ != null) { + output.WriteRawTag(90); + output.WriteMessage(RequestOptions); + } + if (directedReadOptions_ != null) { + output.WriteRawTag(114); + output.WriteMessage(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + output.WriteRawTag(120); + output.WriteBool(DataBoostEnabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (transaction_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Transaction); + } + if (Table.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Table); + } + if (Index.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Index); + } + columns_.WriteTo(ref output, _repeated_columns_codec); + if (keySet_ != null) { + output.WriteRawTag(50); + output.WriteMessage(KeySet); + } + if (Limit != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Limit); + } + if (ResumeToken.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(ResumeToken); + } + if (PartitionToken.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(PartitionToken); + } + if (requestOptions_ != null) { + output.WriteRawTag(90); + output.WriteMessage(RequestOptions); + } + if (directedReadOptions_ != null) { + output.WriteRawTag(114); + output.WriteMessage(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + output.WriteRawTag(120); + output.WriteBool(DataBoostEnabled); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (transaction_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction); + } + if (Table.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Table); + } + if (Index.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Index); + } + size += columns_.CalculateSize(_repeated_columns_codec); + if (keySet_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(KeySet); + } + if (Limit != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Limit); + } + if (ResumeToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ResumeToken); + } + if (PartitionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PartitionToken); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + if (directedReadOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(DirectedReadOptions); + } + if (DataBoostEnabled != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReadRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.transaction_ != null) { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + Transaction.MergeFrom(other.Transaction); + } + if (other.Table.Length != 0) { + Table = other.Table; + } + if (other.Index.Length != 0) { + Index = other.Index; + } + columns_.Add(other.columns_); + if (other.keySet_ != null) { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + KeySet.MergeFrom(other.KeySet); + } + if (other.Limit != 0L) { + Limit = other.Limit; + } + if (other.ResumeToken.Length != 0) { + ResumeToken = other.ResumeToken; + } + if (other.PartitionToken.Length != 0) { + PartitionToken = other.PartitionToken; + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + if (other.directedReadOptions_ != null) { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + DirectedReadOptions.MergeFrom(other.DirectedReadOptions); + } + if (other.DataBoostEnabled != false) { + DataBoostEnabled = other.DataBoostEnabled; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Table = input.ReadString(); + break; + } + case 34: { + Index = input.ReadString(); + break; + } + case 42: { + columns_.AddEntriesFrom(input, _repeated_columns_codec); + break; + } + case 50: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + case 64: { + Limit = input.ReadInt64(); + break; + } + case 74: { + ResumeToken = input.ReadBytes(); + break; + } + case 82: { + PartitionToken = input.ReadBytes(); + break; + } + case 90: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 114: { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + input.ReadMessage(DirectedReadOptions); + break; + } + case 120: { + DataBoostEnabled = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (transaction_ == null) { + Transaction = new global::Google.Cloud.Spanner.V1.TransactionSelector(); + } + input.ReadMessage(Transaction); + break; + } + case 26: { + Table = input.ReadString(); + break; + } + case 34: { + Index = input.ReadString(); + break; + } + case 42: { + columns_.AddEntriesFrom(ref input, _repeated_columns_codec); + break; + } + case 50: { + if (keySet_ == null) { + KeySet = new global::Google.Cloud.Spanner.V1.KeySet(); + } + input.ReadMessage(KeySet); + break; + } + case 64: { + Limit = input.ReadInt64(); + break; + } + case 74: { + ResumeToken = input.ReadBytes(); + break; + } + case 82: { + PartitionToken = input.ReadBytes(); + break; + } + case 90: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 114: { + if (directedReadOptions_ == null) { + DirectedReadOptions = new global::Google.Cloud.Spanner.V1.DirectedReadOptions(); + } + input.ReadMessage(DirectedReadOptions); + break; + } + case 120: { + DataBoostEnabled = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for + /// [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BeginTransactionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BeginTransactionRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BeginTransactionRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BeginTransactionRequest(BeginTransactionRequest other) : this() { + session_ = other.session_; + options_ = other.options_ != null ? other.options_.Clone() : null; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BeginTransactionRequest Clone() { + return new BeginTransactionRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the transaction runs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "options" field. + public const int OptionsFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.TransactionOptions options_; + /// + /// Required. Options for the new transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions Options { + get { return options_; } + set { + options_ = value; + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 3; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// Priority is ignored for this request. Setting the priority in this + /// request_options struct will not do anything. To set the priority for a + /// transaction, set it on the reads and writes that are part of this + /// transaction instead. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BeginTransactionRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BeginTransactionRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(Options, other.Options)) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (options_ != null) hash ^= Options.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (options_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Options); + } + if (requestOptions_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RequestOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (options_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Options); + } + if (requestOptions_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RequestOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (options_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BeginTransactionRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.options_ != null) { + if (options_ == null) { + Options = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + Options.MergeFrom(other.Options); + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (options_ == null) { + Options = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + input.ReadMessage(Options); + break; + } + case 26: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + if (options_ == null) { + Options = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + input.ReadMessage(Options); + break; + } + case 26: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [Commit][google.spanner.v1.Spanner.Commit]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CommitRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CommitRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitRequest(CommitRequest other) : this() { + session_ = other.session_; + mutations_ = other.mutations_.Clone(); + returnCommitStats_ = other.returnCommitStats_; + maxCommitDelay_ = other.maxCommitDelay_ != null ? other.maxCommitDelay_.Clone() : null; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + switch (other.TransactionCase) { + case TransactionOneofCase.TransactionId: + TransactionId = other.TransactionId; + break; + case TransactionOneofCase.SingleUseTransaction: + SingleUseTransaction = other.SingleUseTransaction.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CommitRequest Clone() { + return new CommitRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the transaction to be committed is running. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction_id" field. + public const int TransactionIdFieldNumber = 2; + /// + /// Commit a previously-started transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TransactionId { + get { return HasTransactionId ? (pb::ByteString) transaction_ : pb::ByteString.Empty; } + set { + transaction_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + transactionCase_ = TransactionOneofCase.TransactionId; + } + } + /// Gets whether the "transaction_id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTransactionId { + get { return transactionCase_ == TransactionOneofCase.TransactionId; } + } + /// Clears the value of the oneof if it's currently set to "transaction_id" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTransactionId() { + if (HasTransactionId) { + ClearTransaction(); + } + } + + /// Field number for the "single_use_transaction" field. + public const int SingleUseTransactionFieldNumber = 3; + /// + /// 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 is 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions SingleUseTransaction { + get { return transactionCase_ == TransactionOneofCase.SingleUseTransaction ? (global::Google.Cloud.Spanner.V1.TransactionOptions) transaction_ : null; } + set { + transaction_ = value; + transactionCase_ = value == null ? TransactionOneofCase.None : TransactionOneofCase.SingleUseTransaction; + } + } + + /// Field number for the "mutations" field. + public const int MutationsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_mutations_codec + = pb::FieldCodec.ForMessage(34, global::Google.Cloud.Spanner.V1.Mutation.Parser); + private readonly pbc::RepeatedField mutations_ = new pbc::RepeatedField(); + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Mutations { + get { return mutations_; } + } + + /// Field number for the "return_commit_stats" field. + public const int ReturnCommitStatsFieldNumber = 5; + private bool returnCommitStats_; + /// + /// If `true`, then statistics related to the transaction will be included in + /// the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. + /// Default value is `false`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ReturnCommitStats { + get { return returnCommitStats_; } + set { + returnCommitStats_ = value; + } + } + + /// Field number for the "max_commit_delay" field. + public const int MaxCommitDelayFieldNumber = 8; + private global::Google.Protobuf.WellKnownTypes.Duration maxCommitDelay_; + /// + /// Optional. The amount of latency this request is willing to incur in order + /// to improve throughput. If this field is not set, Spanner assumes requests + /// are relatively latency sensitive and automatically determines an + /// appropriate delay time. You can specify a batching delay value between 0 + /// and 500 ms. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration MaxCommitDelay { + get { return maxCommitDelay_; } + set { + maxCommitDelay_ = value; + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 6; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + private object transaction_; + /// Enum of possible cases for the "transaction" oneof. + public enum TransactionOneofCase { + None = 0, + TransactionId = 2, + SingleUseTransaction = 3, + } + private TransactionOneofCase transactionCase_ = TransactionOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionOneofCase TransactionCase { + get { return transactionCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTransaction() { + transactionCase_ = TransactionOneofCase.None; + transaction_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CommitRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CommitRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (TransactionId != other.TransactionId) return false; + if (!object.Equals(SingleUseTransaction, other.SingleUseTransaction)) return false; + if(!mutations_.Equals(other.mutations_)) return false; + if (ReturnCommitStats != other.ReturnCommitStats) return false; + if (!object.Equals(MaxCommitDelay, other.MaxCommitDelay)) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + if (TransactionCase != other.TransactionCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (HasTransactionId) hash ^= TransactionId.GetHashCode(); + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) hash ^= SingleUseTransaction.GetHashCode(); + hash ^= mutations_.GetHashCode(); + if (ReturnCommitStats != false) hash ^= ReturnCommitStats.GetHashCode(); + if (maxCommitDelay_ != null) hash ^= MaxCommitDelay.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + hash ^= (int) transactionCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (HasTransactionId) { + output.WriteRawTag(18); + output.WriteBytes(TransactionId); + } + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) { + output.WriteRawTag(26); + output.WriteMessage(SingleUseTransaction); + } + mutations_.WriteTo(output, _repeated_mutations_codec); + if (ReturnCommitStats != false) { + output.WriteRawTag(40); + output.WriteBool(ReturnCommitStats); + } + if (requestOptions_ != null) { + output.WriteRawTag(50); + output.WriteMessage(RequestOptions); + } + if (maxCommitDelay_ != null) { + output.WriteRawTag(66); + output.WriteMessage(MaxCommitDelay); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (HasTransactionId) { + output.WriteRawTag(18); + output.WriteBytes(TransactionId); + } + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) { + output.WriteRawTag(26); + output.WriteMessage(SingleUseTransaction); + } + mutations_.WriteTo(ref output, _repeated_mutations_codec); + if (ReturnCommitStats != false) { + output.WriteRawTag(40); + output.WriteBool(ReturnCommitStats); + } + if (requestOptions_ != null) { + output.WriteRawTag(50); + output.WriteMessage(RequestOptions); + } + if (maxCommitDelay_ != null) { + output.WriteRawTag(66); + output.WriteMessage(MaxCommitDelay); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (HasTransactionId) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TransactionId); + } + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SingleUseTransaction); + } + size += mutations_.CalculateSize(_repeated_mutations_codec); + if (ReturnCommitStats != false) { + size += 1 + 1; + } + if (maxCommitDelay_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MaxCommitDelay); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CommitRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + mutations_.Add(other.mutations_); + if (other.ReturnCommitStats != false) { + ReturnCommitStats = other.ReturnCommitStats; + } + if (other.maxCommitDelay_ != null) { + if (maxCommitDelay_ == null) { + MaxCommitDelay = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + MaxCommitDelay.MergeFrom(other.MaxCommitDelay); + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + switch (other.TransactionCase) { + case TransactionOneofCase.TransactionId: + TransactionId = other.TransactionId; + break; + case TransactionOneofCase.SingleUseTransaction: + if (SingleUseTransaction == null) { + SingleUseTransaction = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + SingleUseTransaction.MergeFrom(other.SingleUseTransaction); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + TransactionId = input.ReadBytes(); + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) { + subBuilder.MergeFrom(SingleUseTransaction); + } + input.ReadMessage(subBuilder); + SingleUseTransaction = subBuilder; + break; + } + case 34: { + mutations_.AddEntriesFrom(input, _repeated_mutations_codec); + break; + } + case 40: { + ReturnCommitStats = input.ReadBool(); + break; + } + case 50: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 66: { + if (maxCommitDelay_ == null) { + MaxCommitDelay = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(MaxCommitDelay); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + TransactionId = input.ReadBytes(); + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (transactionCase_ == TransactionOneofCase.SingleUseTransaction) { + subBuilder.MergeFrom(SingleUseTransaction); + } + input.ReadMessage(subBuilder); + SingleUseTransaction = subBuilder; + break; + } + case 34: { + mutations_.AddEntriesFrom(ref input, _repeated_mutations_codec); + break; + } + case 40: { + ReturnCommitStats = input.ReadBool(); + break; + } + case 50: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 66: { + if (maxCommitDelay_ == null) { + MaxCommitDelay = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + input.ReadMessage(MaxCommitDelay); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [Rollback][google.spanner.v1.Spanner.Rollback]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RollbackRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RollbackRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RollbackRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RollbackRequest(RollbackRequest other) : this() { + session_ = other.session_; + transactionId_ = other.transactionId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RollbackRequest Clone() { + return new RollbackRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the transaction to roll back is running. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "transaction_id" field. + public const int TransactionIdFieldNumber = 2; + private pb::ByteString transactionId_ = pb::ByteString.Empty; + /// + /// Required. The transaction to roll back. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TransactionId { + get { return transactionId_; } + set { + transactionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RollbackRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RollbackRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (TransactionId != other.TransactionId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (TransactionId.Length != 0) hash ^= TransactionId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (TransactionId.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(TransactionId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (TransactionId.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(TransactionId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (TransactionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TransactionId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RollbackRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.TransactionId.Length != 0) { + TransactionId = other.TransactionId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + TransactionId = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 18: { + TransactionId = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + /// + /// The request for [BatchWrite][google.spanner.v1.Spanner.BatchWrite]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchWriteRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchWriteRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteRequest(BatchWriteRequest other) : this() { + session_ = other.session_; + requestOptions_ = other.requestOptions_ != null ? other.requestOptions_.Clone() : null; + mutationGroups_ = other.mutationGroups_.Clone(); + excludeTxnFromChangeStreams_ = other.excludeTxnFromChangeStreams_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteRequest Clone() { + return new BatchWriteRequest(this); + } + + /// Field number for the "session" field. + public const int SessionFieldNumber = 1; + private string session_ = ""; + /// + /// Required. The session in which the batch request is to be run. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Session { + get { return session_; } + set { + session_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "request_options" field. + public const int RequestOptionsFieldNumber = 3; + private global::Google.Cloud.Spanner.V1.RequestOptions requestOptions_; + /// + /// Common options for this request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.RequestOptions RequestOptions { + get { return requestOptions_; } + set { + requestOptions_ = value; + } + } + + /// Field number for the "mutation_groups" field. + public const int MutationGroupsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_mutationGroups_codec + = pb::FieldCodec.ForMessage(34, global::Google.Cloud.Spanner.V1.BatchWriteRequest.Types.MutationGroup.Parser); + private readonly pbc::RepeatedField mutationGroups_ = new pbc::RepeatedField(); + /// + /// Required. The groups of mutations to be applied. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MutationGroups { + get { return mutationGroups_; } + } + + /// Field number for the "exclude_txn_from_change_streams" field. + public const int ExcludeTxnFromChangeStreamsFieldNumber = 5; + private bool excludeTxnFromChangeStreams_; + /// + /// Optional. When `exclude_txn_from_change_streams` is set to `true`: + /// * Mutations from all transactions in this batch write operation will not + /// be recorded in change streams with DDL option `allow_txn_exclusion=true` + /// that are tracking columns modified by these transactions. + /// * Mutations from all transactions in this batch write operation will be + /// recorded in change streams with DDL option `allow_txn_exclusion=false or + /// not set` that are tracking columns modified by these transactions. + /// + /// When `exclude_txn_from_change_streams` is set to `false` or not set, + /// mutations from all transactions in this batch write operation will be + /// recorded in all change streams that are tracking columns modified by these + /// transactions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ExcludeTxnFromChangeStreams { + get { return excludeTxnFromChangeStreams_; } + set { + excludeTxnFromChangeStreams_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchWriteRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchWriteRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Session != other.Session) return false; + if (!object.Equals(RequestOptions, other.RequestOptions)) return false; + if(!mutationGroups_.Equals(other.mutationGroups_)) return false; + if (ExcludeTxnFromChangeStreams != other.ExcludeTxnFromChangeStreams) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Session.Length != 0) hash ^= Session.GetHashCode(); + if (requestOptions_ != null) hash ^= RequestOptions.GetHashCode(); + hash ^= mutationGroups_.GetHashCode(); + if (ExcludeTxnFromChangeStreams != false) hash ^= ExcludeTxnFromChangeStreams.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (requestOptions_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RequestOptions); + } + mutationGroups_.WriteTo(output, _repeated_mutationGroups_codec); + if (ExcludeTxnFromChangeStreams != false) { + output.WriteRawTag(40); + output.WriteBool(ExcludeTxnFromChangeStreams); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Session.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Session); + } + if (requestOptions_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RequestOptions); + } + mutationGroups_.WriteTo(ref output, _repeated_mutationGroups_codec); + if (ExcludeTxnFromChangeStreams != false) { + output.WriteRawTag(40); + output.WriteBool(ExcludeTxnFromChangeStreams); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Session.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Session); + } + if (requestOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequestOptions); + } + size += mutationGroups_.CalculateSize(_repeated_mutationGroups_codec); + if (ExcludeTxnFromChangeStreams != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchWriteRequest other) { + if (other == null) { + return; + } + if (other.Session.Length != 0) { + Session = other.Session; + } + if (other.requestOptions_ != null) { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + RequestOptions.MergeFrom(other.RequestOptions); + } + mutationGroups_.Add(other.mutationGroups_); + if (other.ExcludeTxnFromChangeStreams != false) { + ExcludeTxnFromChangeStreams = other.ExcludeTxnFromChangeStreams; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 26: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 34: { + mutationGroups_.AddEntriesFrom(input, _repeated_mutationGroups_codec); + break; + } + case 40: { + ExcludeTxnFromChangeStreams = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Session = input.ReadString(); + break; + } + case 26: { + if (requestOptions_ == null) { + RequestOptions = new global::Google.Cloud.Spanner.V1.RequestOptions(); + } + input.ReadMessage(RequestOptions); + break; + } + case 34: { + mutationGroups_.AddEntriesFrom(ref input, _repeated_mutationGroups_codec); + break; + } + case 40: { + ExcludeTxnFromChangeStreams = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the BatchWriteRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A group of mutations to be committed together. Related mutations should be + /// placed in a group. For example, two mutations inserting rows with the same + /// primary key prefix in both parent and child tables are related. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MutationGroup : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MutationGroup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.BatchWriteRequest.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MutationGroup() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MutationGroup(MutationGroup other) : this() { + mutations_ = other.mutations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MutationGroup Clone() { + return new MutationGroup(this); + } + + /// Field number for the "mutations" field. + public const int MutationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_mutations_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.Mutation.Parser); + private readonly pbc::RepeatedField mutations_ = new pbc::RepeatedField(); + /// + /// Required. The mutations in this group. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Mutations { + get { return mutations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MutationGroup); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MutationGroup other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!mutations_.Equals(other.mutations_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= mutations_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + mutations_.WriteTo(output, _repeated_mutations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + mutations_.WriteTo(ref output, _repeated_mutations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += mutations_.CalculateSize(_repeated_mutations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MutationGroup other) { + if (other == null) { + return; + } + mutations_.Add(other.mutations_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + mutations_.AddEntriesFrom(input, _repeated_mutations_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + mutations_.AddEntriesFrom(ref input, _repeated_mutations_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// The result of applying a batch of mutations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchWriteResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchWriteResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteResponse(BatchWriteResponse other) : this() { + indexes_ = other.indexes_.Clone(); + status_ = other.status_ != null ? other.status_.Clone() : null; + commitTimestamp_ = other.commitTimestamp_ != null ? other.commitTimestamp_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchWriteResponse Clone() { + return new BatchWriteResponse(this); + } + + /// Field number for the "indexes" field. + public const int IndexesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_indexes_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField indexes_ = new pbc::RepeatedField(); + /// + /// The mutation groups applied in this batch. The values index into the + /// `mutation_groups` field in the corresponding `BatchWriteRequest`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Indexes { + get { return indexes_; } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Google.Rpc.Status status_; + /// + /// An `OK` status indicates success. Any other status indicates a failure. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Rpc.Status Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "commit_timestamp" field. + public const int CommitTimestampFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp commitTimestamp_; + /// + /// The commit timestamp of the transaction that applied this batch. + /// Present if `status` is `OK`, absent otherwise. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CommitTimestamp { + get { return commitTimestamp_; } + set { + commitTimestamp_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchWriteResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchWriteResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!indexes_.Equals(other.indexes_)) return false; + if (!object.Equals(Status, other.Status)) return false; + if (!object.Equals(CommitTimestamp, other.CommitTimestamp)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= indexes_.GetHashCode(); + if (status_ != null) hash ^= Status.GetHashCode(); + if (commitTimestamp_ != null) hash ^= CommitTimestamp.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + indexes_.WriteTo(output, _repeated_indexes_codec); + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (commitTimestamp_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CommitTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + indexes_.WriteTo(ref output, _repeated_indexes_codec); + if (status_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Status); + } + if (commitTimestamp_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CommitTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += indexes_.CalculateSize(_repeated_indexes_codec); + if (status_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Status); + } + if (commitTimestamp_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CommitTimestamp); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchWriteResponse other) { + if (other == null) { + return; + } + indexes_.Add(other.indexes_); + if (other.status_ != null) { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + Status.MergeFrom(other.Status); + } + if (other.commitTimestamp_ != null) { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CommitTimestamp.MergeFrom(other.CommitTimestamp); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + indexes_.AddEntriesFrom(input, _repeated_indexes_codec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + input.ReadMessage(Status); + break; + } + case 26: { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CommitTimestamp); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + indexes_.AddEntriesFrom(ref input, _repeated_indexes_codec); + break; + } + case 18: { + if (status_ == null) { + Status = new global::Google.Rpc.Status(); + } + input.ReadMessage(Status); + break; + } + case 26: { + if (commitTimestamp_ == null) { + CommitTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CommitTimestamp); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerClient.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerClient.g.cs new file mode 100755 index 000000000000..a35a0b53b05d --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerClient.g.cs @@ -0,0 +1,3520 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using proto = Google.Protobuf; +using wkt = Google.Protobuf.WellKnownTypes; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using sys = System; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using linq = System.Linq; +using st = System.Threading; +using stt = System.Threading.Tasks; + +namespace Google.Cloud.Spanner.V1 +{ + /// Settings for instances. + public sealed partial class SpannerSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static SpannerSettings GetDefault() => new SpannerSettings(); + + /// Constructs a new object with default settings. + public SpannerSettings() + { + } + + private SpannerSettings(SpannerSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + CreateSessionSettings = existing.CreateSessionSettings; + BatchCreateSessionsSettings = existing.BatchCreateSessionsSettings; + GetSessionSettings = existing.GetSessionSettings; + ListSessionsSettings = existing.ListSessionsSettings; + DeleteSessionSettings = existing.DeleteSessionSettings; + ExecuteSqlSettings = existing.ExecuteSqlSettings; + ExecuteStreamingSqlSettings = existing.ExecuteStreamingSqlSettings; + ExecuteBatchDmlSettings = existing.ExecuteBatchDmlSettings; + ReadSettings = existing.ReadSettings; + StreamingReadSettings = existing.StreamingReadSettings; + BeginTransactionSettings = existing.BeginTransactionSettings; + CommitSettings = existing.CommitSettings; + RollbackSettings = existing.RollbackSettings; + PartitionQuerySettings = existing.PartitionQuerySettings; + PartitionReadSettings = existing.PartitionReadSettings; + BatchWriteSettings = existing.BatchWriteSettings; + OnCopy(existing); + } + + partial void OnCopy(SpannerSettings existing); + + /// + /// for synchronous and asynchronous calls to SpannerClient.CreateSession + /// and SpannerClient.CreateSessionAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings CreateSessionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to + /// SpannerClient.BatchCreateSessions and SpannerClient.BatchCreateSessionsAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings BatchCreateSessionsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.GetSession + /// and SpannerClient.GetSessionAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings GetSessionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.ListSessions + /// and SpannerClient.ListSessionsAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 3600 seconds. + /// + /// + public gaxgrpc::CallSettings ListSessionsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(3600000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.DeleteSession + /// and SpannerClient.DeleteSessionAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteSessionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.ExecuteSql + /// and SpannerClient.ExecuteSqlAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings ExecuteSqlSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to + /// SpannerClient.ExecuteStreamingSql and SpannerClient.ExecuteStreamingSqlAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 3600 seconds. + /// + /// + public gaxgrpc::CallSettings ExecuteStreamingSqlSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(3600000))); + + /// + /// for synchronous and asynchronous calls to + /// SpannerClient.ExecuteBatchDml and SpannerClient.ExecuteBatchDmlAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings ExecuteBatchDmlSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.Read and + /// SpannerClient.ReadAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings ReadSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.StreamingRead + /// and SpannerClient.StreamingReadAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 3600 seconds. + /// + /// + public gaxgrpc::CallSettings StreamingReadSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(3600000))); + + /// + /// for synchronous and asynchronous calls to + /// SpannerClient.BeginTransaction and SpannerClient.BeginTransactionAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings BeginTransactionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.Commit + /// and SpannerClient.CommitAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 3600 seconds. + /// + /// + public gaxgrpc::CallSettings CommitSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(3600000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.Rollback + /// and SpannerClient.RollbackAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings RollbackSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to + /// SpannerClient.PartitionQuery and SpannerClient.PartitionQueryAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings PartitionQuerySettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.PartitionRead + /// and SpannerClient.PartitionReadAsync. + /// + /// + /// + /// Initial retry delay: 250 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 32000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 30 seconds. + /// + /// + public gaxgrpc::CallSettings PartitionReadSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(30000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(250), maxBackoff: sys::TimeSpan.FromMilliseconds(32000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.ResourceExhausted))); + + /// + /// for synchronous and asynchronous calls to SpannerClient.BatchWrite + /// and SpannerClient.BatchWriteAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 3600 seconds. + /// + /// + public gaxgrpc::CallSettings BatchWriteSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(3600000))); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public SpannerSettings Clone() => new SpannerSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class SpannerClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public SpannerSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public SpannerClientBuilder() : base(SpannerClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref SpannerClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override SpannerClient Build() + { + SpannerClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private SpannerClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return SpannerClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return SpannerClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => SpannerClient.ChannelPool; + } + + /// Spanner client wrapper, for convenient use. + /// + /// Cloud Spanner API + /// + /// The Cloud Spanner API can be used to manage sessions and execute + /// transactions on data stored in Cloud Spanner databases. + /// + public abstract partial class SpannerClient + { + /// + /// The default endpoint for the Spanner service, which is a host of "spanner.googleapis.com" and a port of 443. + /// + public static string DefaultEndpoint { get; } = "spanner.googleapis.com:443"; + + /// The default Spanner scopes. + /// + /// The default Spanner scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// https://www.googleapis.com/auth/spanner.data + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(Spanner.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, endpoint and settings. + /// To specify custom credentials or other settings, use . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new SpannerClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and settings. To + /// specify custom credentials or other settings, use . + /// + /// The created . + public static SpannerClient Create() => new SpannerClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static SpannerClient Create(grpccore::CallInvoker callInvoker, SpannerSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + Spanner.SpannerClient grpcClient = new Spanner.SpannerClient(callInvoker); + return new SpannerClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC Spanner client + public virtual Spanner.SpannerClient GrpcClient => throw new sys::NotImplementedException(); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session CreateSession(CreateSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(CreateSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(CreateSessionRequest request, st::CancellationToken cancellationToken) => + CreateSessionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session CreateSession(string database, gaxgrpc::CallSettings callSettings = null) => + CreateSession(new CreateSessionRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + }, callSettings); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(string database, gaxgrpc::CallSettings callSettings = null) => + CreateSessionAsync(new CreateSessionRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + }, callSettings); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(string database, st::CancellationToken cancellationToken) => + CreateSessionAsync(database, gaxgrpc::CallSettings.FromCancellationToken(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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session CreateSession(DatabaseName database, gaxgrpc::CallSettings callSettings = null) => + CreateSession(new CreateSessionRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + }, callSettings); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(DatabaseName database, gaxgrpc::CallSettings callSettings = null) => + CreateSessionAsync(new CreateSessionRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + }, callSettings); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// + /// Required. The database in which the new session is created. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CreateSessionAsync(DatabaseName database, st::CancellationToken cancellationToken) => + CreateSessionAsync(database, gaxgrpc::CallSettings.FromCancellationToken(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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual BatchCreateSessionsResponse BatchCreateSessions(BatchCreateSessionsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(BatchCreateSessionsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(BatchCreateSessionsRequest request, st::CancellationToken cancellationToken) => + BatchCreateSessionsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual BatchCreateSessionsResponse BatchCreateSessions(string database, int sessionCount, gaxgrpc::CallSettings callSettings = null) => + BatchCreateSessions(new BatchCreateSessionsRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + SessionCount = sessionCount, + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(string database, int sessionCount, gaxgrpc::CallSettings callSettings = null) => + BatchCreateSessionsAsync(new BatchCreateSessionsRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + SessionCount = sessionCount, + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(string database, int sessionCount, st::CancellationToken cancellationToken) => + BatchCreateSessionsAsync(database, sessionCount, gaxgrpc::CallSettings.FromCancellationToken(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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual BatchCreateSessionsResponse BatchCreateSessions(DatabaseName database, int sessionCount, gaxgrpc::CallSettings callSettings = null) => + BatchCreateSessions(new BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + SessionCount = sessionCount, + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(DatabaseName database, int sessionCount, gaxgrpc::CallSettings callSettings = null) => + BatchCreateSessionsAsync(new BatchCreateSessionsRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + SessionCount = sessionCount, + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The database in which the new sessions are created. + /// + /// + /// Required. The number of sessions to be created in this batch call. + /// The API may 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). + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BatchCreateSessionsAsync(DatabaseName database, int sessionCount, st::CancellationToken cancellationToken) => + BatchCreateSessionsAsync(database, sessionCount, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session GetSession(GetSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(GetSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(GetSessionRequest request, st::CancellationToken cancellationToken) => + GetSessionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session GetSession(string name, gaxgrpc::CallSettings callSettings = null) => + GetSession(new GetSessionRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetSessionAsync(new GetSessionRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(string name, st::CancellationToken cancellationToken) => + GetSessionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Session GetSession(SessionName name, gaxgrpc::CallSettings callSettings = null) => + GetSession(new GetSessionRequest + { + SessionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(SessionName name, gaxgrpc::CallSettings callSettings = null) => + GetSessionAsync(new GetSessionRequest + { + SessionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// + /// Required. The name of the session to retrieve. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetSessionAsync(SessionName name, st::CancellationToken cancellationToken) => + GetSessionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Lists all sessions in a given database. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListSessions(ListSessionsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists all sessions in a given database. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListSessionsAsync(ListSessionsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists all sessions in a given database. + /// + /// + /// Required. The database in which to list sessions. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// 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. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListSessions(string database, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListSessions(new ListSessionsRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all sessions in a given database. + /// + /// + /// Required. The database in which to list sessions. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// 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. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListSessionsAsync(string database, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListSessionsAsync(new ListSessionsRequest + { + Database = gax::GaxPreconditions.CheckNotNullOrEmpty(database, nameof(database)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all sessions in a given database. + /// + /// + /// Required. The database in which to list sessions. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// 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. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListSessions(DatabaseName database, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListSessions(new ListSessionsRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all sessions in a given database. + /// + /// + /// Required. The database in which to list sessions. + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// 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. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListSessionsAsync(DatabaseName database, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListSessionsAsync(new ListSessionsRequest + { + DatabaseAsDatabaseName = gax::GaxPreconditions.CheckNotNull(database, nameof(database)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteSession(DeleteSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(DeleteSessionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(DeleteSessionRequest request, st::CancellationToken cancellationToken) => + DeleteSessionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteSession(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteSession(new DeleteSessionRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteSessionAsync(new DeleteSessionRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(string name, st::CancellationToken cancellationToken) => + DeleteSessionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteSession(SessionName name, gaxgrpc::CallSettings callSettings = null) => + DeleteSession(new DeleteSessionRequest + { + SessionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(SessionName name, gaxgrpc::CallSettings callSettings = null) => + DeleteSessionAsync(new DeleteSessionRequest + { + SessionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// + /// Required. The name of the session to delete. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteSessionAsync(SessionName name, st::CancellationToken cancellationToken) => + DeleteSessionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResultSet ExecuteSql(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ExecuteSqlAsync(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ExecuteSqlAsync(ExecuteSqlRequest request, st::CancellationToken cancellationToken) => + ExecuteSqlAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Server streaming methods for . + /// + public abstract partial class ExecuteStreamingSqlStream : gaxgrpc::ServerStreamingBase + { + } + + /// + /// 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public virtual ExecuteStreamingSqlStream ExecuteStreamingSql(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ExecuteBatchDmlResponse ExecuteBatchDml(ExecuteBatchDmlRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ExecuteBatchDmlAsync(ExecuteBatchDmlRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ExecuteBatchDmlAsync(ExecuteBatchDmlRequest request, st::CancellationToken cancellationToken) => + ExecuteBatchDmlAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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 cannot 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ResultSet Read(ReadRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 cannot 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ReadAsync(ReadRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 cannot 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. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ReadAsync(ReadRequest request, st::CancellationToken cancellationToken) => + ReadAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Server streaming methods for . + /// + public abstract partial class StreamingReadStream : gaxgrpc::ServerStreamingBase + { + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public virtual StreamingReadStream StreamingRead(ReadRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Transaction BeginTransaction(BeginTransactionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(BeginTransactionRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(BeginTransactionRequest request, st::CancellationToken cancellationToken) => + BeginTransactionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Transaction BeginTransaction(string session, TransactionOptions options, gaxgrpc::CallSettings callSettings = null) => + BeginTransaction(new BeginTransactionRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + Options = gax::GaxPreconditions.CheckNotNull(options, nameof(options)), + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(string session, TransactionOptions options, gaxgrpc::CallSettings callSettings = null) => + BeginTransactionAsync(new BeginTransactionRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + Options = gax::GaxPreconditions.CheckNotNull(options, nameof(options)), + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(string session, TransactionOptions options, st::CancellationToken cancellationToken) => + BeginTransactionAsync(session, options, gaxgrpc::CallSettings.FromCancellationToken(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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Transaction BeginTransaction(SessionName session, TransactionOptions options, gaxgrpc::CallSettings callSettings = null) => + BeginTransaction(new BeginTransactionRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + Options = gax::GaxPreconditions.CheckNotNull(options, nameof(options)), + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(SessionName session, TransactionOptions options, gaxgrpc::CallSettings callSettings = null) => + BeginTransactionAsync(new BeginTransactionRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + Options = gax::GaxPreconditions.CheckNotNull(options, nameof(options)), + }, callSettings); + + /// + /// 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. + /// + /// + /// Required. The session in which the transaction runs. + /// + /// + /// Required. Options for the new transaction. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BeginTransactionAsync(SessionName session, TransactionOptions options, st::CancellationToken cancellationToken) => + BeginTransactionAsync(session, options, gaxgrpc::CallSettings.FromCancellationToken(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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CommitResponse Commit(CommitRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(CommitRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(CommitRequest request, st::CancellationToken cancellationToken) => + CommitAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CommitResponse Commit(string session, proto::ByteString transactionId, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + Commit(new CommitRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + TransactionId = transactionId ?? proto::ByteString.Empty, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(string session, proto::ByteString transactionId, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + CommitAsync(new CommitRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + TransactionId = transactionId ?? proto::ByteString.Empty, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(string session, proto::ByteString transactionId, scg::IEnumerable mutations, st::CancellationToken cancellationToken) => + CommitAsync(session, transactionId, mutations, gaxgrpc::CallSettings.FromCancellationToken(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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CommitResponse Commit(SessionName session, proto::ByteString transactionId, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + Commit(new CommitRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + TransactionId = transactionId ?? proto::ByteString.Empty, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(SessionName session, proto::ByteString transactionId, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + CommitAsync(new CommitRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + TransactionId = transactionId ?? proto::ByteString.Empty, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// Commit a previously-started transaction. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(SessionName session, proto::ByteString transactionId, scg::IEnumerable mutations, st::CancellationToken cancellationToken) => + CommitAsync(session, transactionId, mutations, gaxgrpc::CallSettings.FromCancellationToken(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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CommitResponse Commit(string session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + Commit(new CommitRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + SingleUseTransaction = singleUseTransaction, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(string session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + CommitAsync(new CommitRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + SingleUseTransaction = singleUseTransaction, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(string session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, st::CancellationToken cancellationToken) => + CommitAsync(session, singleUseTransaction, mutations, gaxgrpc::CallSettings.FromCancellationToken(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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CommitResponse Commit(SessionName session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + Commit(new CommitRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + SingleUseTransaction = singleUseTransaction, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(SessionName session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, gaxgrpc::CallSettings callSettings = null) => + CommitAsync(new CommitRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + SingleUseTransaction = singleUseTransaction, + Mutations = + { + mutations ?? linq::Enumerable.Empty(), + }, + }, callSettings); + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// + /// Required. The session in which the transaction to be committed is running. + /// + /// + /// 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 is 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. + /// + /// + /// The mutations to be executed when this transaction commits. All + /// mutations are applied atomically, in the order they appear in + /// this list. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task CommitAsync(SessionName session, TransactionOptions singleUseTransaction, scg::IEnumerable mutations, st::CancellationToken cancellationToken) => + CommitAsync(session, singleUseTransaction, mutations, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void Rollback(RollbackRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(RollbackRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(RollbackRequest request, st::CancellationToken cancellationToken) => + RollbackAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void Rollback(string session, proto::ByteString transactionId, gaxgrpc::CallSettings callSettings = null) => + Rollback(new RollbackRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + TransactionId = gax::GaxPreconditions.CheckNotNull(transactionId, nameof(transactionId)), + }, callSettings); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(string session, proto::ByteString transactionId, gaxgrpc::CallSettings callSettings = null) => + RollbackAsync(new RollbackRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + TransactionId = gax::GaxPreconditions.CheckNotNull(transactionId, nameof(transactionId)), + }, callSettings); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(string session, proto::ByteString transactionId, st::CancellationToken cancellationToken) => + RollbackAsync(session, transactionId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void Rollback(SessionName session, proto::ByteString transactionId, gaxgrpc::CallSettings callSettings = null) => + Rollback(new RollbackRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + TransactionId = gax::GaxPreconditions.CheckNotNull(transactionId, nameof(transactionId)), + }, callSettings); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(SessionName session, proto::ByteString transactionId, gaxgrpc::CallSettings callSettings = null) => + RollbackAsync(new RollbackRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + TransactionId = gax::GaxPreconditions.CheckNotNull(transactionId, nameof(transactionId)), + }, callSettings); + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// + /// Required. The session in which the transaction to roll back is running. + /// + /// + /// Required. The transaction to roll back. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task RollbackAsync(SessionName session, proto::ByteString transactionId, st::CancellationToken cancellationToken) => + RollbackAsync(session, transactionId, gaxgrpc::CallSettings.FromCancellationToken(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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual PartitionResponse PartitionQuery(PartitionQueryRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task PartitionQueryAsync(PartitionQueryRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task PartitionQueryAsync(PartitionQueryRequest request, st::CancellationToken cancellationToken) => + PartitionQueryAsync(request, gaxgrpc::CallSettings.FromCancellationToken(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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual PartitionResponse PartitionRead(PartitionReadRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task PartitionReadAsync(PartitionReadRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task PartitionReadAsync(PartitionReadRequest request, st::CancellationToken cancellationToken) => + PartitionReadAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Server streaming methods for . + /// + public abstract partial class BatchWriteStream : gaxgrpc::ServerStreamingBase + { + } + + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public virtual BatchWriteStream BatchWrite(BatchWriteRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// + /// Required. The session in which the batch request is to be run. + /// + /// + /// Required. The groups of mutations to be applied. + /// + /// If not null, applies overrides to this RPC call. + /// The server stream. + public virtual BatchWriteStream BatchWrite(string session, scg::IEnumerable mutationGroups, gaxgrpc::CallSettings callSettings = null) => + BatchWrite(new BatchWriteRequest + { + Session = gax::GaxPreconditions.CheckNotNullOrEmpty(session, nameof(session)), + MutationGroups = + { + gax::GaxPreconditions.CheckNotNull(mutationGroups, nameof(mutationGroups)), + }, + }, callSettings); + + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// + /// Required. The session in which the batch request is to be run. + /// + /// + /// Required. The groups of mutations to be applied. + /// + /// If not null, applies overrides to this RPC call. + /// The server stream. + public virtual BatchWriteStream BatchWrite(SessionName session, scg::IEnumerable mutationGroups, gaxgrpc::CallSettings callSettings = null) => + BatchWrite(new BatchWriteRequest + { + SessionAsSessionName = gax::GaxPreconditions.CheckNotNull(session, nameof(session)), + MutationGroups = + { + gax::GaxPreconditions.CheckNotNull(mutationGroups, nameof(mutationGroups)), + }, + }, callSettings); + } + + /// Spanner client wrapper implementation, for convenient use. + /// + /// Cloud Spanner API + /// + /// The Cloud Spanner API can be used to manage sessions and execute + /// transactions on data stored in Cloud Spanner databases. + /// + public sealed partial class SpannerClientImpl : SpannerClient + { + private readonly gaxgrpc::ApiCall _callCreateSession; + + private readonly gaxgrpc::ApiCall _callBatchCreateSessions; + + private readonly gaxgrpc::ApiCall _callGetSession; + + private readonly gaxgrpc::ApiCall _callListSessions; + + private readonly gaxgrpc::ApiCall _callDeleteSession; + + private readonly gaxgrpc::ApiCall _callExecuteSql; + + private readonly gaxgrpc::ApiServerStreamingCall _callExecuteStreamingSql; + + private readonly gaxgrpc::ApiCall _callExecuteBatchDml; + + private readonly gaxgrpc::ApiCall _callRead; + + private readonly gaxgrpc::ApiServerStreamingCall _callStreamingRead; + + private readonly gaxgrpc::ApiCall _callBeginTransaction; + + private readonly gaxgrpc::ApiCall _callCommit; + + private readonly gaxgrpc::ApiCall _callRollback; + + private readonly gaxgrpc::ApiCall _callPartitionQuery; + + private readonly gaxgrpc::ApiCall _callPartitionRead; + + private readonly gaxgrpc::ApiServerStreamingCall _callBatchWrite; + + /// + /// Constructs a client wrapper for the Spanner service, with the specified gRPC client and settings. + /// + /// The underlying gRPC client. + /// The base used within this client. + /// Optional to use within this client. + public SpannerClientImpl(Spanner.SpannerClient grpcClient, SpannerSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + SpannerSettings effectiveSettings = settings ?? SpannerSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + _callCreateSession = clientHelper.BuildApiCall("CreateSession", grpcClient.CreateSessionAsync, grpcClient.CreateSession, effectiveSettings.CreateSessionSettings).WithGoogleRequestParam("database", request => request.Database); + Modify_ApiCall(ref _callCreateSession); + Modify_CreateSessionApiCall(ref _callCreateSession); + _callBatchCreateSessions = clientHelper.BuildApiCall("BatchCreateSessions", grpcClient.BatchCreateSessionsAsync, grpcClient.BatchCreateSessions, effectiveSettings.BatchCreateSessionsSettings).WithGoogleRequestParam("database", request => request.Database); + Modify_ApiCall(ref _callBatchCreateSessions); + Modify_BatchCreateSessionsApiCall(ref _callBatchCreateSessions); + _callGetSession = clientHelper.BuildApiCall("GetSession", grpcClient.GetSessionAsync, grpcClient.GetSession, effectiveSettings.GetSessionSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetSession); + Modify_GetSessionApiCall(ref _callGetSession); + _callListSessions = clientHelper.BuildApiCall("ListSessions", grpcClient.ListSessionsAsync, grpcClient.ListSessions, effectiveSettings.ListSessionsSettings).WithGoogleRequestParam("database", request => request.Database); + Modify_ApiCall(ref _callListSessions); + Modify_ListSessionsApiCall(ref _callListSessions); + _callDeleteSession = clientHelper.BuildApiCall("DeleteSession", grpcClient.DeleteSessionAsync, grpcClient.DeleteSession, effectiveSettings.DeleteSessionSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteSession); + Modify_DeleteSessionApiCall(ref _callDeleteSession); + _callExecuteSql = clientHelper.BuildApiCall("ExecuteSql", grpcClient.ExecuteSqlAsync, grpcClient.ExecuteSql, effectiveSettings.ExecuteSqlSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callExecuteSql); + Modify_ExecuteSqlApiCall(ref _callExecuteSql); + _callExecuteStreamingSql = clientHelper.BuildApiCall("ExecuteStreamingSql", grpcClient.ExecuteStreamingSql, effectiveSettings.ExecuteStreamingSqlSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callExecuteStreamingSql); + Modify_ExecuteStreamingSqlApiCall(ref _callExecuteStreamingSql); + _callExecuteBatchDml = clientHelper.BuildApiCall("ExecuteBatchDml", grpcClient.ExecuteBatchDmlAsync, grpcClient.ExecuteBatchDml, effectiveSettings.ExecuteBatchDmlSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callExecuteBatchDml); + Modify_ExecuteBatchDmlApiCall(ref _callExecuteBatchDml); + _callRead = clientHelper.BuildApiCall("Read", grpcClient.ReadAsync, grpcClient.Read, effectiveSettings.ReadSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callRead); + Modify_ReadApiCall(ref _callRead); + _callStreamingRead = clientHelper.BuildApiCall("StreamingRead", grpcClient.StreamingRead, effectiveSettings.StreamingReadSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callStreamingRead); + Modify_StreamingReadApiCall(ref _callStreamingRead); + _callBeginTransaction = clientHelper.BuildApiCall("BeginTransaction", grpcClient.BeginTransactionAsync, grpcClient.BeginTransaction, effectiveSettings.BeginTransactionSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callBeginTransaction); + Modify_BeginTransactionApiCall(ref _callBeginTransaction); + _callCommit = clientHelper.BuildApiCall("Commit", grpcClient.CommitAsync, grpcClient.Commit, effectiveSettings.CommitSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callCommit); + Modify_CommitApiCall(ref _callCommit); + _callRollback = clientHelper.BuildApiCall("Rollback", grpcClient.RollbackAsync, grpcClient.Rollback, effectiveSettings.RollbackSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callRollback); + Modify_RollbackApiCall(ref _callRollback); + _callPartitionQuery = clientHelper.BuildApiCall("PartitionQuery", grpcClient.PartitionQueryAsync, grpcClient.PartitionQuery, effectiveSettings.PartitionQuerySettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callPartitionQuery); + Modify_PartitionQueryApiCall(ref _callPartitionQuery); + _callPartitionRead = clientHelper.BuildApiCall("PartitionRead", grpcClient.PartitionReadAsync, grpcClient.PartitionRead, effectiveSettings.PartitionReadSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callPartitionRead); + Modify_PartitionReadApiCall(ref _callPartitionRead); + _callBatchWrite = clientHelper.BuildApiCall("BatchWrite", grpcClient.BatchWrite, effectiveSettings.BatchWriteSettings).WithGoogleRequestParam("session", request => request.Session); + Modify_ApiCall(ref _callBatchWrite); + Modify_BatchWriteApiCall(ref _callBatchWrite); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_ApiCall(ref gaxgrpc::ApiServerStreamingCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_CreateSessionApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_BatchCreateSessionsApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetSessionApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListSessionsApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteSessionApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ExecuteSqlApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ExecuteStreamingSqlApiCall(ref gaxgrpc::ApiServerStreamingCall call); + + partial void Modify_ExecuteBatchDmlApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ReadApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_StreamingReadApiCall(ref gaxgrpc::ApiServerStreamingCall call); + + partial void Modify_BeginTransactionApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CommitApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_RollbackApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_PartitionQueryApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_PartitionReadApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_BatchWriteApiCall(ref gaxgrpc::ApiServerStreamingCall call); + + partial void OnConstruction(Spanner.SpannerClient grpcClient, SpannerSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC Spanner client + public override Spanner.SpannerClient GrpcClient { get; } + + partial void Modify_CreateSessionRequest(ref CreateSessionRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_BatchCreateSessionsRequest(ref BatchCreateSessionsRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetSessionRequest(ref GetSessionRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListSessionsRequest(ref ListSessionsRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteSessionRequest(ref DeleteSessionRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ExecuteSqlRequest(ref ExecuteSqlRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ExecuteBatchDmlRequest(ref ExecuteBatchDmlRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ReadRequest(ref ReadRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_BeginTransactionRequest(ref BeginTransactionRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CommitRequest(ref CommitRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_RollbackRequest(ref RollbackRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_PartitionQueryRequest(ref PartitionQueryRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_PartitionReadRequest(ref PartitionReadRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_BatchWriteRequest(ref BatchWriteRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Session CreateSession(CreateSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateSessionRequest(ref request, ref callSettings); + return _callCreateSession.Sync(request, callSettings); + } + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task CreateSessionAsync(CreateSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateSessionRequest(ref request, ref callSettings); + return _callCreateSession.Async(request, callSettings); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override BatchCreateSessionsResponse BatchCreateSessions(BatchCreateSessionsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BatchCreateSessionsRequest(ref request, ref callSettings); + return _callBatchCreateSessions.Sync(request, callSettings); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task BatchCreateSessionsAsync(BatchCreateSessionsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BatchCreateSessionsRequest(ref request, ref callSettings); + return _callBatchCreateSessions.Async(request, callSettings); + } + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Session GetSession(GetSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetSessionRequest(ref request, ref callSettings); + return _callGetSession.Sync(request, callSettings); + } + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetSessionAsync(GetSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetSessionRequest(ref request, ref callSettings); + return _callGetSession.Async(request, callSettings); + } + + /// + /// Lists all sessions in a given database. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListSessions(ListSessionsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListSessionsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListSessions, request, callSettings); + } + + /// + /// Lists all sessions in a given database. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListSessionsAsync(ListSessionsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListSessionsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListSessions, request, callSettings); + } + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override void DeleteSession(DeleteSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteSessionRequest(ref request, ref callSettings); + _callDeleteSession.Sync(request, callSettings); + } + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task DeleteSessionAsync(DeleteSessionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteSessionRequest(ref request, ref callSettings); + return _callDeleteSession.Async(request, callSettings); + } + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ResultSet ExecuteSql(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ExecuteSqlRequest(ref request, ref callSettings); + return _callExecuteSql.Sync(request, callSettings); + } + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task ExecuteSqlAsync(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ExecuteSqlRequest(ref request, ref callSettings); + return _callExecuteSql.Async(request, callSettings); + } + + internal sealed partial class ExecuteStreamingSqlStreamImpl : ExecuteStreamingSqlStream + { + /// Construct the server streaming method for ExecuteStreamingSql. + /// The underlying gRPC server streaming call. + public ExecuteStreamingSqlStreamImpl(grpccore::AsyncServerStreamingCall call) => GrpcCall = call; + + public override grpccore::AsyncServerStreamingCall GrpcCall { get; } + } + + /// + /// 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 request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public override SpannerClient.ExecuteStreamingSqlStream ExecuteStreamingSql(ExecuteSqlRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ExecuteSqlRequest(ref request, ref callSettings); + return new ExecuteStreamingSqlStreamImpl(_callExecuteStreamingSql.Call(request, callSettings)); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ExecuteBatchDmlResponse ExecuteBatchDml(ExecuteBatchDmlRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ExecuteBatchDmlRequest(ref request, ref callSettings); + return _callExecuteBatchDml.Sync(request, callSettings); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task ExecuteBatchDmlAsync(ExecuteBatchDmlRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ExecuteBatchDmlRequest(ref request, ref callSettings); + return _callExecuteBatchDml.Async(request, callSettings); + } + + /// + /// 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 cannot 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ResultSet Read(ReadRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ReadRequest(ref request, ref callSettings); + return _callRead.Sync(request, callSettings); + } + + /// + /// 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 cannot 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task ReadAsync(ReadRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ReadRequest(ref request, ref callSettings); + return _callRead.Async(request, callSettings); + } + + internal sealed partial class StreamingReadStreamImpl : StreamingReadStream + { + /// Construct the server streaming method for StreamingRead. + /// The underlying gRPC server streaming call. + public StreamingReadStreamImpl(grpccore::AsyncServerStreamingCall call) => GrpcCall = call; + + public override grpccore::AsyncServerStreamingCall GrpcCall { get; } + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public override SpannerClient.StreamingReadStream StreamingRead(ReadRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ReadRequest(ref request, ref callSettings); + return new StreamingReadStreamImpl(_callStreamingRead.Call(request, callSettings)); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Transaction BeginTransaction(BeginTransactionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BeginTransactionRequest(ref request, ref callSettings); + return _callBeginTransaction.Sync(request, callSettings); + } + + /// + /// 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task BeginTransactionAsync(BeginTransactionRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BeginTransactionRequest(ref request, ref callSettings); + return _callBeginTransaction.Async(request, callSettings); + } + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override CommitResponse Commit(CommitRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CommitRequest(ref request, ref callSettings); + return _callCommit.Sync(request, callSettings); + } + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task CommitAsync(CommitRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CommitRequest(ref request, ref callSettings); + return _callCommit.Async(request, callSettings); + } + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override void Rollback(RollbackRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_RollbackRequest(ref request, ref callSettings); + _callRollback.Sync(request, callSettings); + } + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task RollbackAsync(RollbackRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_RollbackRequest(ref request, ref callSettings); + return _callRollback.Async(request, callSettings); + } + + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override PartitionResponse PartitionQuery(PartitionQueryRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PartitionQueryRequest(ref request, ref callSettings); + return _callPartitionQuery.Sync(request, callSettings); + } + + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task PartitionQueryAsync(PartitionQueryRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PartitionQueryRequest(ref request, ref callSettings); + return _callPartitionQuery.Async(request, callSettings); + } + + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override PartitionResponse PartitionRead(PartitionReadRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PartitionReadRequest(ref request, ref callSettings); + return _callPartitionRead.Sync(request, callSettings); + } + + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task PartitionReadAsync(PartitionReadRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PartitionReadRequest(ref request, ref callSettings); + return _callPartitionRead.Async(request, callSettings); + } + + internal sealed partial class BatchWriteStreamImpl : BatchWriteStream + { + /// Construct the server streaming method for BatchWrite. + /// The underlying gRPC server streaming call. + public BatchWriteStreamImpl(grpccore::AsyncServerStreamingCall call) => GrpcCall = call; + + public override grpccore::AsyncServerStreamingCall GrpcCall { get; } + } + + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The server stream. + public override SpannerClient.BatchWriteStream BatchWrite(BatchWriteRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BatchWriteRequest(ref request, ref callSettings); + return new BatchWriteStreamImpl(_callBatchWrite.Call(request, callSettings)); + } + } + + public partial class ListSessionsRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListSessionsResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Sessions.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerGrpc.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerGrpc.g.cs new file mode 100755 index 000000000000..04467a9f3735 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerGrpc.g.cs @@ -0,0 +1,1853 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto +// +// Original file comments: +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.Spanner.V1 { + /// + /// Cloud Spanner API + /// + /// The Cloud Spanner API can be used to manage sessions and execute + /// transactions on data stored in Cloud Spanner databases. + /// + public static partial class Spanner + { + static readonly string __ServiceName = "google.spanner.v1.Spanner"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_CreateSessionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.CreateSessionRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_Session = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.Session.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_BatchCreateSessionsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_BatchCreateSessionsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.BatchCreateSessionsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_GetSessionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.GetSessionRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ListSessionsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ListSessionsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ListSessionsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ListSessionsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_DeleteSessionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.DeleteSessionRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ExecuteSqlRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ExecuteSqlRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ResultSet = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ResultSet.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_PartialResultSet = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.PartialResultSet.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ExecuteBatchDmlRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ExecuteBatchDmlResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_ReadRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.ReadRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_BeginTransactionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.BeginTransactionRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_Transaction = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.Transaction.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_CommitRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.CommitRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_CommitResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.CommitResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_RollbackRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.RollbackRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_PartitionQueryRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.PartitionQueryRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_PartitionResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.PartitionResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_PartitionReadRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.PartitionReadRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_BatchWriteRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.BatchWriteRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_spanner_v1_BatchWriteResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Spanner.V1.BatchWriteResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateSession = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateSession", + __Marshaller_google_spanner_v1_CreateSessionRequest, + __Marshaller_google_spanner_v1_Session); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_BatchCreateSessions = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "BatchCreateSessions", + __Marshaller_google_spanner_v1_BatchCreateSessionsRequest, + __Marshaller_google_spanner_v1_BatchCreateSessionsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetSession = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetSession", + __Marshaller_google_spanner_v1_GetSessionRequest, + __Marshaller_google_spanner_v1_Session); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListSessions = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListSessions", + __Marshaller_google_spanner_v1_ListSessionsRequest, + __Marshaller_google_spanner_v1_ListSessionsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteSession = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteSession", + __Marshaller_google_spanner_v1_DeleteSessionRequest, + __Marshaller_google_protobuf_Empty); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ExecuteSql = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ExecuteSql", + __Marshaller_google_spanner_v1_ExecuteSqlRequest, + __Marshaller_google_spanner_v1_ResultSet); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ExecuteStreamingSql = new grpc::Method( + grpc::MethodType.ServerStreaming, + __ServiceName, + "ExecuteStreamingSql", + __Marshaller_google_spanner_v1_ExecuteSqlRequest, + __Marshaller_google_spanner_v1_PartialResultSet); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ExecuteBatchDml = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ExecuteBatchDml", + __Marshaller_google_spanner_v1_ExecuteBatchDmlRequest, + __Marshaller_google_spanner_v1_ExecuteBatchDmlResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Read = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Read", + __Marshaller_google_spanner_v1_ReadRequest, + __Marshaller_google_spanner_v1_ResultSet); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_StreamingRead = new grpc::Method( + grpc::MethodType.ServerStreaming, + __ServiceName, + "StreamingRead", + __Marshaller_google_spanner_v1_ReadRequest, + __Marshaller_google_spanner_v1_PartialResultSet); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_BeginTransaction = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "BeginTransaction", + __Marshaller_google_spanner_v1_BeginTransactionRequest, + __Marshaller_google_spanner_v1_Transaction); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Commit = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Commit", + __Marshaller_google_spanner_v1_CommitRequest, + __Marshaller_google_spanner_v1_CommitResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_Rollback = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "Rollback", + __Marshaller_google_spanner_v1_RollbackRequest, + __Marshaller_google_protobuf_Empty); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_PartitionQuery = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "PartitionQuery", + __Marshaller_google_spanner_v1_PartitionQueryRequest, + __Marshaller_google_spanner_v1_PartitionResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_PartitionRead = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "PartitionRead", + __Marshaller_google_spanner_v1_PartitionReadRequest, + __Marshaller_google_spanner_v1_PartitionResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_BatchWrite = new grpc::Method( + grpc::MethodType.ServerStreaming, + __ServiceName, + "BatchWrite", + __Marshaller_google_spanner_v1_BatchWriteRequest, + __Marshaller_google_spanner_v1_BatchWriteResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Spanner.V1.SpannerReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of Spanner + [grpc::BindServiceMethod(typeof(Spanner), "BindService")] + public abstract partial class SpannerBase + { + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateSession(global::Google.Cloud.Spanner.V1.CreateSessionRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task BatchCreateSessions(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetSession(global::Google.Cloud.Spanner.V1.GetSessionRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Lists all sessions in a given database. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListSessions(global::Google.Cloud.Spanner.V1.ListSessionsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteSession(global::Google.Cloud.Spanner.V1.DeleteSessionRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ExecuteSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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 request received from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ExecuteStreamingSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ExecuteBatchDml(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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 cannot 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. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Read(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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. + /// + /// The request received from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task StreamingRead(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task BeginTransaction(global::Google.Cloud.Spanner.V1.BeginTransactionRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Commit(global::Google.Cloud.Spanner.V1.CommitRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task Rollback(global::Google.Cloud.Spanner.V1.RollbackRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task PartitionQuery(global::Google.Cloud.Spanner.V1.PartitionQueryRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task PartitionRead(global::Google.Cloud.Spanner.V1.PartitionReadRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// The request received from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task BatchWrite(global::Google.Cloud.Spanner.V1.BatchWriteRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for Spanner + public partial class SpannerClient : grpc::ClientBase + { + /// Creates a new client for Spanner + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public SpannerClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for Spanner that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public SpannerClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected SpannerClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected SpannerClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Session CreateSession(global::Google.Cloud.Spanner.V1.CreateSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateSession(request, new grpc::CallOptions(headers, deadline, 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Session CreateSession(global::Google.Cloud.Spanner.V1.CreateSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateSession, null, options, request); + } + /// + /// 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateSessionAsync(global::Google.Cloud.Spanner.V1.CreateSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateSessionAsync(request, new grpc::CallOptions(headers, deadline, 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 is a good idea to + /// delete idle and unneeded sessions. + /// Aside from explicit deletes, Cloud Spanner may delete sessions for which 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, e.g., `"SELECT 1"`. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateSessionAsync(global::Google.Cloud.Spanner.V1.CreateSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateSession, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.BatchCreateSessionsResponse BatchCreateSessions(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BatchCreateSessions(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.BatchCreateSessionsResponse BatchCreateSessions(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_BatchCreateSessions, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall BatchCreateSessionsAsync(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BatchCreateSessionsAsync(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall BatchCreateSessionsAsync(global::Google.Cloud.Spanner.V1.BatchCreateSessionsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_BatchCreateSessions, null, options, request); + } + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Session GetSession(global::Google.Cloud.Spanner.V1.GetSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetSession(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Session GetSession(global::Google.Cloud.Spanner.V1.GetSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetSession, null, options, request); + } + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetSessionAsync(global::Google.Cloud.Spanner.V1.GetSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetSessionAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a session. Returns `NOT_FOUND` if the session does not exist. + /// This is mainly useful for determining whether a session is still + /// alive. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetSessionAsync(global::Google.Cloud.Spanner.V1.GetSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetSession, null, options, request); + } + /// + /// Lists all sessions in a given database. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ListSessionsResponse ListSessions(global::Google.Cloud.Spanner.V1.ListSessionsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListSessions(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists all sessions in a given database. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ListSessionsResponse ListSessions(global::Google.Cloud.Spanner.V1.ListSessionsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListSessions, null, options, request); + } + /// + /// Lists all sessions in a given database. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListSessionsAsync(global::Google.Cloud.Spanner.V1.ListSessionsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListSessionsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists all sessions in a given database. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListSessionsAsync(global::Google.Cloud.Spanner.V1.ListSessionsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListSessions, null, options, request); + } + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteSession(global::Google.Cloud.Spanner.V1.DeleteSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteSession(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteSession(global::Google.Cloud.Spanner.V1.DeleteSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteSession, null, options, request); + } + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteSessionAsync(global::Google.Cloud.Spanner.V1.DeleteSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteSessionAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Ends a session, releasing server resources associated with it. This will + /// asynchronously trigger cancellation of any operations that are running with + /// this session. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteSessionAsync(global::Google.Cloud.Spanner.V1.DeleteSessionRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteSession, null, options, request); + } + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ResultSet ExecuteSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ExecuteSql(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ResultSet ExecuteSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ExecuteSql, null, options, request); + } + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ExecuteSqlAsync(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ExecuteSqlAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Executes an SQL statement, returning all results in a single reply. This + /// method cannot 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 request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ExecuteSqlAsync(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ExecuteSql, null, options, request); + } + /// + /// 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 request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall ExecuteStreamingSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ExecuteStreamingSql(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// 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 request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall ExecuteStreamingSql(global::Google.Cloud.Spanner.V1.ExecuteSqlRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncServerStreamingCall(__Method_ExecuteStreamingSql, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse ExecuteBatchDml(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ExecuteBatchDml(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ExecuteBatchDmlResponse ExecuteBatchDml(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ExecuteBatchDml, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ExecuteBatchDmlAsync(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ExecuteBatchDmlAsync(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ExecuteBatchDmlAsync(global::Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ExecuteBatchDml, null, options, request); + } + /// + /// 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 cannot 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ResultSet Read(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Read(request, new grpc::CallOptions(headers, deadline, 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 cannot 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.ResultSet Read(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Read, null, options, request); + } + /// + /// 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 cannot 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ReadAsync(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ReadAsync(request, new grpc::CallOptions(headers, deadline, 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 cannot 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ReadAsync(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Read, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall StreamingRead(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingRead(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall StreamingRead(global::Google.Cloud.Spanner.V1.ReadRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncServerStreamingCall(__Method_StreamingRead, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Transaction BeginTransaction(global::Google.Cloud.Spanner.V1.BeginTransactionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BeginTransaction(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.Transaction BeginTransaction(global::Google.Cloud.Spanner.V1.BeginTransactionRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_BeginTransaction, null, options, request); + } + /// + /// 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall BeginTransactionAsync(global::Google.Cloud.Spanner.V1.BeginTransactionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BeginTransactionAsync(request, new grpc::CallOptions(headers, deadline, 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall BeginTransactionAsync(global::Google.Cloud.Spanner.V1.BeginTransactionRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_BeginTransaction, null, options, request); + } + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.CommitResponse Commit(global::Google.Cloud.Spanner.V1.CommitRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Commit(request, new grpc::CallOptions(headers, deadline, 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.CommitResponse Commit(global::Google.Cloud.Spanner.V1.CommitRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Commit, null, options, request); + } + /// + /// 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CommitAsync(global::Google.Cloud.Spanner.V1.CommitRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CommitAsync(request, new grpc::CallOptions(headers, deadline, 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 re-attempt + /// the transaction from the beginning, re-using 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. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CommitAsync(global::Google.Cloud.Spanner.V1.CommitRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Commit, null, options, request); + } + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty Rollback(global::Google.Cloud.Spanner.V1.RollbackRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return Rollback(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty Rollback(global::Google.Cloud.Spanner.V1.RollbackRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_Rollback, null, options, request); + } + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall RollbackAsync(global::Google.Cloud.Spanner.V1.RollbackRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return RollbackAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Rolls back a transaction, releasing any locks it holds. It is 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 is not + /// found. `Rollback` never returns `ABORTED`. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall RollbackAsync(global::Google.Cloud.Spanner.V1.RollbackRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_Rollback, null, options, request); + } + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.PartitionResponse PartitionQuery(global::Google.Cloud.Spanner.V1.PartitionQueryRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PartitionQuery(request, new grpc::CallOptions(headers, deadline, 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.PartitionResponse PartitionQuery(global::Google.Cloud.Spanner.V1.PartitionQueryRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_PartitionQuery, null, options, request); + } + /// + /// 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PartitionQueryAsync(global::Google.Cloud.Spanner.V1.PartitionQueryRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PartitionQueryAsync(request, new grpc::CallOptions(headers, deadline, 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 is not possible to resume the query, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PartitionQueryAsync(global::Google.Cloud.Spanner.V1.PartitionQueryRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_PartitionQuery, null, options, request); + } + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.PartitionResponse PartitionRead(global::Google.Cloud.Spanner.V1.PartitionReadRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PartitionRead(request, new grpc::CallOptions(headers, deadline, 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Spanner.V1.PartitionResponse PartitionRead(global::Google.Cloud.Spanner.V1.PartitionReadRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_PartitionRead, null, options, request); + } + /// + /// 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PartitionReadAsync(global::Google.Cloud.Spanner.V1.PartitionReadRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PartitionReadAsync(request, new grpc::CallOptions(headers, deadline, 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 is not possible to resume the read, and + /// the whole operation must be restarted from the beginning. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PartitionReadAsync(global::Google.Cloud.Spanner.V1.PartitionReadRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_PartitionRead, null, options, request); + } + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall BatchWrite(global::Google.Cloud.Spanner.V1.BatchWriteRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BatchWrite(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// 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, i.e., some groups may have been committed successfully, while + /// some may 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 may be applied more than once. Replays of non-idempotent mutations + /// may have undesirable effects. For example, replays of an insert mutation + /// may produce an already exists error or if you use generated or commit + /// timestamp-based keys, it may result in additional rows being added to the + /// mutation's table. We recommend structuring your mutation groups to be + /// idempotent to avoid this issue. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncServerStreamingCall BatchWrite(global::Google.Cloud.Spanner.V1.BatchWriteRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncServerStreamingCall(__Method_BatchWrite, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override SpannerClient NewInstance(ClientBaseConfiguration configuration) + { + return new SpannerClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(SpannerBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_CreateSession, serviceImpl.CreateSession) + .AddMethod(__Method_BatchCreateSessions, serviceImpl.BatchCreateSessions) + .AddMethod(__Method_GetSession, serviceImpl.GetSession) + .AddMethod(__Method_ListSessions, serviceImpl.ListSessions) + .AddMethod(__Method_DeleteSession, serviceImpl.DeleteSession) + .AddMethod(__Method_ExecuteSql, serviceImpl.ExecuteSql) + .AddMethod(__Method_ExecuteStreamingSql, serviceImpl.ExecuteStreamingSql) + .AddMethod(__Method_ExecuteBatchDml, serviceImpl.ExecuteBatchDml) + .AddMethod(__Method_Read, serviceImpl.Read) + .AddMethod(__Method_StreamingRead, serviceImpl.StreamingRead) + .AddMethod(__Method_BeginTransaction, serviceImpl.BeginTransaction) + .AddMethod(__Method_Commit, serviceImpl.Commit) + .AddMethod(__Method_Rollback, serviceImpl.Rollback) + .AddMethod(__Method_PartitionQuery, serviceImpl.PartitionQuery) + .AddMethod(__Method_PartitionRead, serviceImpl.PartitionRead) + .AddMethod(__Method_BatchWrite, serviceImpl.BatchWrite).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, SpannerBase serviceImpl) + { + serviceBinder.AddMethod(__Method_CreateSession, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateSession)); + serviceBinder.AddMethod(__Method_BatchCreateSessions, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.BatchCreateSessions)); + serviceBinder.AddMethod(__Method_GetSession, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetSession)); + serviceBinder.AddMethod(__Method_ListSessions, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListSessions)); + serviceBinder.AddMethod(__Method_DeleteSession, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteSession)); + serviceBinder.AddMethod(__Method_ExecuteSql, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ExecuteSql)); + serviceBinder.AddMethod(__Method_ExecuteStreamingSql, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.ExecuteStreamingSql)); + serviceBinder.AddMethod(__Method_ExecuteBatchDml, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ExecuteBatchDml)); + serviceBinder.AddMethod(__Method_Read, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Read)); + serviceBinder.AddMethod(__Method_StreamingRead, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.StreamingRead)); + serviceBinder.AddMethod(__Method_BeginTransaction, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.BeginTransaction)); + serviceBinder.AddMethod(__Method_Commit, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Commit)); + serviceBinder.AddMethod(__Method_Rollback, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Rollback)); + serviceBinder.AddMethod(__Method_PartitionQuery, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.PartitionQuery)); + serviceBinder.AddMethod(__Method_PartitionRead, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.PartitionRead)); + serviceBinder.AddMethod(__Method_BatchWrite, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.BatchWrite)); + } + + } +} +#endregion diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerResourceNames.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerResourceNames.g.cs new file mode 100755 index 000000000000..58ee048e6d2f --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/SpannerResourceNames.g.cs @@ -0,0 +1,713 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gcsv = Google.Cloud.Spanner.V1; +using sys = System; + +namespace Google.Cloud.Spanner.V1 +{ + /// Resource name for the Session resource. + public sealed partial class SessionName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + ProjectInstanceDatabaseSession = 1, + } + + private static gax::PathTemplate s_projectInstanceDatabaseSession = new gax::PathTemplate("projects/{project}/instances/{instance}/databases/{database}/sessions/{session}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static SessionName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new SessionName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// The Session ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static SessionName FromProjectInstanceDatabaseSession(string projectId, string instanceId, string databaseId, string sessionId) => + new SessionName(ResourceNameType.ProjectInstanceDatabaseSession, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), databaseId: gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId)), sessionId: gax::GaxPreconditions.CheckNotNullOrEmpty(sessionId, nameof(sessionId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// The Session ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + public static string Format(string projectId, string instanceId, string databaseId, string sessionId) => + FormatProjectInstanceDatabaseSession(projectId, instanceId, databaseId, sessionId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// The Session ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session}. + /// + public static string FormatProjectInstanceDatabaseSession(string projectId, string instanceId, string databaseId, string sessionId) => + s_projectInstanceDatabaseSession.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId)), gax::GaxPreconditions.CheckNotNullOrEmpty(sessionId, nameof(sessionId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static SessionName Parse(string sessionName) => Parse(sessionName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static SessionName Parse(string sessionName, bool allowUnparsed) => + TryParse(sessionName, allowUnparsed, out SessionName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string sessionName, out SessionName result) => TryParse(sessionName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string sessionName, bool allowUnparsed, out SessionName result) + { + gax::GaxPreconditions.CheckNotNull(sessionName, nameof(sessionName)); + gax::TemplatedResourceName resourceName; + if (s_projectInstanceDatabaseSession.TryParseName(sessionName, out resourceName)) + { + result = FromProjectInstanceDatabaseSession(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(sessionName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private SessionName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string databaseId = null, string instanceId = null, string projectId = null, string sessionId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + DatabaseId = databaseId; + InstanceId = instanceId; + ProjectId = projectId; + SessionId = sessionId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/instances/{instance}/databases/{database}/sessions/{session} + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// The Session ID. Must not be null or empty. + public SessionName(string projectId, string instanceId, string databaseId, string sessionId) : this(ResourceNameType.ProjectInstanceDatabaseSession, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), databaseId: gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId)), sessionId: gax::GaxPreconditions.CheckNotNullOrEmpty(sessionId, nameof(sessionId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Database ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string DatabaseId { get; } + + /// + /// The Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The Session ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string SessionId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectInstanceDatabaseSession: return s_projectInstanceDatabaseSession.Expand(ProjectId, InstanceId, DatabaseId, SessionId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as SessionName); + + /// + public bool Equals(SessionName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(SessionName a, SessionName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(SessionName a, SessionName b) => !(a == b); + } + + /// Resource name for the Database resource. + public sealed partial class DatabaseName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/instances/{instance}/databases/{database}. + /// + ProjectInstanceDatabase = 1, + } + + private static gax::PathTemplate s_projectInstanceDatabase = new gax::PathTemplate("projects/{project}/instances/{instance}/databases/{database}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static DatabaseName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new DatabaseName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/instances/{instance}/databases/{database}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static DatabaseName FromProjectInstanceDatabase(string projectId, string instanceId, string databaseId) => + new DatabaseName(ResourceNameType.ProjectInstanceDatabase, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), databaseId: gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}. + /// + public static string Format(string projectId, string instanceId, string databaseId) => + FormatProjectInstanceDatabase(projectId, instanceId, databaseId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}. + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/instances/{instance}/databases/{database}. + /// + public static string FormatProjectInstanceDatabase(string projectId, string instanceId, string databaseId) => + s_projectInstanceDatabase.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/instances/{instance}/databases/{database} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static DatabaseName Parse(string databaseName) => Parse(databaseName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/instances/{instance}/databases/{database} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static DatabaseName Parse(string databaseName, bool allowUnparsed) => + TryParse(databaseName, allowUnparsed, out DatabaseName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/instances/{instance}/databases/{database} + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string databaseName, out DatabaseName result) => TryParse(databaseName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/instances/{instance}/databases/{database} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string databaseName, bool allowUnparsed, out DatabaseName result) + { + gax::GaxPreconditions.CheckNotNull(databaseName, nameof(databaseName)); + gax::TemplatedResourceName resourceName; + if (s_projectInstanceDatabase.TryParseName(databaseName, out resourceName)) + { + result = FromProjectInstanceDatabase(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(databaseName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private DatabaseName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string databaseId = null, string instanceId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + DatabaseId = databaseId; + InstanceId = instanceId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/instances/{instance}/databases/{database} + /// + /// The Project ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// The Database ID. Must not be null or empty. + public DatabaseName(string projectId, string instanceId, string databaseId) : this(ResourceNameType.ProjectInstanceDatabase, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), databaseId: gax::GaxPreconditions.CheckNotNullOrEmpty(databaseId, nameof(databaseId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Database ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string DatabaseId { get; } + + /// + /// The Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectInstanceDatabase: return s_projectInstanceDatabase.Expand(ProjectId, InstanceId, DatabaseId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as DatabaseName); + + /// + public bool Equals(DatabaseName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(DatabaseName a, DatabaseName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(DatabaseName a, DatabaseName b) => !(a == b); + } + + public partial class CreateSessionRequest + { + /// + /// -typed view over the resource name property. + /// + public DatabaseName DatabaseAsDatabaseName + { + get => string.IsNullOrEmpty(Database) ? null : DatabaseName.Parse(Database, allowUnparsed: true); + set => Database = value?.ToString() ?? ""; + } + } + + public partial class BatchCreateSessionsRequest + { + /// + /// -typed view over the resource name property. + /// + public DatabaseName DatabaseAsDatabaseName + { + get => string.IsNullOrEmpty(Database) ? null : DatabaseName.Parse(Database, allowUnparsed: true); + set => Database = value?.ToString() ?? ""; + } + } + + public partial class Session + { + /// + /// -typed view over the resource name property. + /// + public gcsv::SessionName SessionName + { + get => string.IsNullOrEmpty(Name) ? null : gcsv::SessionName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class GetSessionRequest + { + /// + /// -typed view over the resource name property. + /// + public gcsv::SessionName SessionName + { + get => string.IsNullOrEmpty(Name) ? null : gcsv::SessionName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListSessionsRequest + { + /// + /// -typed view over the resource name property. + /// + public DatabaseName DatabaseAsDatabaseName + { + get => string.IsNullOrEmpty(Database) ? null : DatabaseName.Parse(Database, allowUnparsed: true); + set => Database = value?.ToString() ?? ""; + } + } + + public partial class DeleteSessionRequest + { + /// + /// -typed view over the resource name property. + /// + public gcsv::SessionName SessionName + { + get => string.IsNullOrEmpty(Name) ? null : gcsv::SessionName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ExecuteSqlRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class ExecuteBatchDmlRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class PartitionQueryRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class PartitionReadRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class ReadRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class BeginTransactionRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class CommitRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class RollbackRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } + + public partial class BatchWriteRequest + { + /// + /// -typed view over the resource name property. + /// + public SessionName SessionAsSessionName + { + get => string.IsNullOrEmpty(Session) ? null : SessionName.Parse(Session, allowUnparsed: true); + set => Session = value?.ToString() ?? ""; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Transaction.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Transaction.g.cs new file mode 100755 index 000000000000..311d952546ea --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Transaction.g.cs @@ -0,0 +1,2378 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/transaction.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/transaction.proto + public static partial class TransactionReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/transaction.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TransactionReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNnb29nbGUvc3Bhbm5lci92MS90cmFuc2FjdGlvbi5wcm90bxIRZ29vZ2xl", + "LnNwYW5uZXIudjEaHmdvb2dsZS9wcm90b2J1Zi9kdXJhdGlvbi5wcm90bxof", + "Z29vZ2xlL3Byb3RvYnVmL3RpbWVzdGFtcC5wcm90byKUBgoSVHJhbnNhY3Rp", + "b25PcHRpb25zEkUKCnJlYWRfd3JpdGUYASABKAsyLy5nb29nbGUuc3Bhbm5l", + "ci52MS5UcmFuc2FjdGlvbk9wdGlvbnMuUmVhZFdyaXRlSAASTwoPcGFydGl0", + "aW9uZWRfZG1sGAMgASgLMjQuZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rp", + "b25PcHRpb25zLlBhcnRpdGlvbmVkRG1sSAASQwoJcmVhZF9vbmx5GAIgASgL", + "Mi4uZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb25PcHRpb25zLlJlYWRP", + "bmx5SAASJwofZXhjbHVkZV90eG5fZnJvbV9jaGFuZ2Vfc3RyZWFtcxgFIAEo", + "CBqyAQoJUmVhZFdyaXRlElQKDnJlYWRfbG9ja19tb2RlGAEgASgOMjwuZ29v", + "Z2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb25PcHRpb25zLlJlYWRXcml0ZS5S", + "ZWFkTG9ja01vZGUiTwoMUmVhZExvY2tNb2RlEh4KGlJFQURfTE9DS19NT0RF", + "X1VOU1BFQ0lGSUVEEAASDwoLUEVTU0lNSVNUSUMQARIOCgpPUFRJTUlTVElD", + "EAIaEAoOUGFydGl0aW9uZWREbWwaqAIKCFJlYWRPbmx5EhAKBnN0cm9uZxgB", + "IAEoCEgAEjgKEm1pbl9yZWFkX3RpbWVzdGFtcBgCIAEoCzIaLmdvb2dsZS5w", + "cm90b2J1Zi5UaW1lc3RhbXBIABIyCg1tYXhfc3RhbGVuZXNzGAMgASgLMhku", + "Z29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uSAASNAoOcmVhZF90aW1lc3RhbXAY", + "BCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSAASNAoPZXhhY3Rf", + "c3RhbGVuZXNzGAUgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uSAAS", + "HQoVcmV0dXJuX3JlYWRfdGltZXN0YW1wGAYgASgIQhEKD3RpbWVzdGFtcF9i", + "b3VuZEIGCgRtb2RlIk0KC1RyYW5zYWN0aW9uEgoKAmlkGAEgASgMEjIKDnJl", + "YWRfdGltZXN0YW1wGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt", + "cCKkAQoTVHJhbnNhY3Rpb25TZWxlY3RvchI7CgpzaW5nbGVfdXNlGAEgASgL", + "MiUuZ29vZ2xlLnNwYW5uZXIudjEuVHJhbnNhY3Rpb25PcHRpb25zSAASDAoC", + "aWQYAiABKAxIABI2CgViZWdpbhgDIAEoCzIlLmdvb2dsZS5zcGFubmVyLnYx", + "LlRyYW5zYWN0aW9uT3B0aW9uc0gAQgoKCHNlbGVjdG9yQrMBChVjb20uZ29v", + "Z2xlLnNwYW5uZXIudjFCEFRyYW5zYWN0aW9uUHJvdG9QAVo1Y2xvdWQuZ29v", + "Z2xlLmNvbS9nby9zcGFubmVyL2FwaXYxL3NwYW5uZXJwYjtzcGFubmVycGKq", + "AhdHb29nbGUuQ2xvdWQuU3Bhbm5lci5WMcoCF0dvb2dsZVxDbG91ZFxTcGFu", + "bmVyXFYx6gIaR29vZ2xlOjpDbG91ZDo6U3Bhbm5lcjo6VjFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.TransactionOptions), global::Google.Cloud.Spanner.V1.TransactionOptions.Parser, new[]{ "ReadWrite", "PartitionedDml", "ReadOnly", "ExcludeTxnFromChangeStreams" }, new[]{ "Mode" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite), global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Parser, new[]{ "ReadLockMode" }, null, new[]{ typeof(global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml), global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly), global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly.Parser, new[]{ "Strong", "MinReadTimestamp", "MaxStaleness", "ReadTimestamp", "ExactStaleness", "ReturnReadTimestamp" }, new[]{ "TimestampBound" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Transaction), global::Google.Cloud.Spanner.V1.Transaction.Parser, new[]{ "Id", "ReadTimestamp" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.TransactionSelector), global::Google.Cloud.Spanner.V1.TransactionSelector.Parser, new[]{ "SingleUse", "Id", "Begin" }, new[]{ "Selector" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Transactions: + /// + /// Each session can have at most one active transaction at a time (note that + /// standalone reads and queries use a transaction internally and do count + /// towards the one transaction limit). After the active transaction is + /// completed, the session can immediately be re-used for the next transaction. + /// It is not necessary to create a new session for each transaction. + /// + /// Transaction modes: + /// + /// Cloud Spanner supports three transaction modes: + /// + /// 1. Locking read-write. This type of transaction is the only way + /// to write data into Cloud Spanner. These transactions rely on + /// pessimistic locking and, if necessary, two-phase commit. + /// Locking read-write transactions may abort, requiring the + /// application to retry. + /// + /// 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed + /// consistency across several reads, but do not allow + /// writes. Snapshot read-only transactions can be configured to read at + /// timestamps in the past, or configured to perform a strong read + /// (where Spanner will select a timestamp such that the read is + /// guaranteed to see the effects of all transactions that have committed + /// before the start of the read). Snapshot read-only transactions do not + /// need to be committed. + /// + /// Queries on change streams must be performed with the snapshot read-only + /// transaction mode, specifying a strong read. Please see + /// [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong] + /// for more details. + /// + /// 3. Partitioned DML. This type of transaction is used to execute + /// a single Partitioned DML statement. Partitioned DML partitions + /// the key space and runs the DML statement over each partition + /// in parallel using separate, internal transactions that commit + /// independently. Partitioned DML transactions do not need to be + /// committed. + /// + /// For transactions that only read, snapshot read-only transactions + /// provide simpler semantics and are almost always faster. In + /// particular, read-only transactions do not take locks, so they do + /// not conflict with read-write transactions. As a consequence of not + /// taking locks, they also do not abort, so retry loops are not needed. + /// + /// Transactions may only read-write data in a single database. They + /// may, however, read-write data in different tables within that + /// database. + /// + /// Locking read-write transactions: + /// + /// Locking transactions may be used to atomically read-modify-write + /// data anywhere in a database. This type of transaction is externally + /// consistent. + /// + /// Clients should attempt to minimize the amount of time a transaction + /// is active. Faster transactions commit with higher probability + /// and cause less contention. Cloud Spanner attempts to keep read locks + /// active as long as the transaction continues to do reads, and the + /// transaction has not been terminated by + /// [Commit][google.spanner.v1.Spanner.Commit] or + /// [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of + /// inactivity at the client may cause Cloud Spanner to release a + /// transaction's locks and abort it. + /// + /// Conceptually, a read-write transaction consists of zero or more + /// reads or SQL statements followed by + /// [Commit][google.spanner.v1.Spanner.Commit]. At any time before + /// [Commit][google.spanner.v1.Spanner.Commit], the client can send a + /// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the + /// transaction. + /// + /// Semantics: + /// + /// Cloud Spanner can commit the transaction if all read locks it acquired + /// are still valid at commit time, and it is able to acquire write + /// locks for all writes. Cloud Spanner can abort the transaction for any + /// reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees + /// that the transaction has not modified any user data in Cloud Spanner. + /// + /// Unless the transaction commits, Cloud Spanner makes no guarantees about + /// how long the transaction's locks were held for. It is an error to + /// use Cloud Spanner locks for any sort of mutual exclusion other than + /// between Cloud Spanner transactions themselves. + /// + /// Retrying aborted transactions: + /// + /// When a transaction aborts, the application can choose to retry the + /// whole transaction again. To maximize the chances of successfully + /// committing the retry, the client should execute the retry in the + /// same session as the original attempt. The original session's lock + /// priority increases with each consecutive abort, meaning that each + /// attempt has a slightly better chance of success than the previous. + /// + /// Under some circumstances (for example, many transactions attempting to + /// modify the same row(s)), a transaction can abort many times in a + /// short period before successfully committing. Thus, it is not a good + /// idea to cap the number of retries a transaction can attempt; + /// instead, it is better to limit the total amount of time spent + /// retrying. + /// + /// Idle transactions: + /// + /// A transaction is considered idle if it has no outstanding reads or + /// SQL queries and has not started a read or SQL query within the last 10 + /// seconds. Idle transactions can be aborted by Cloud Spanner so that they + /// don't hold on to locks indefinitely. If an idle transaction is aborted, the + /// commit will fail with error `ABORTED`. + /// + /// If this behavior is undesirable, periodically executing a simple + /// SQL query in the transaction (for example, `SELECT 1`) prevents the + /// transaction from becoming idle. + /// + /// Snapshot read-only transactions: + /// + /// Snapshot read-only transactions provides a simpler method than + /// locking read-write transactions for doing several consistent + /// reads. However, this type of transaction does not support writes. + /// + /// Snapshot transactions do not take locks. Instead, they work by + /// choosing a Cloud Spanner timestamp, then executing all reads at that + /// timestamp. Since they do not acquire locks, they do not block + /// concurrent read-write transactions. + /// + /// Unlike locking read-write transactions, snapshot read-only + /// transactions never abort. They can fail if the chosen read + /// timestamp is garbage collected; however, the default garbage + /// collection policy is generous enough that most applications do not + /// need to worry about this in practice. + /// + /// Snapshot read-only transactions do not need to call + /// [Commit][google.spanner.v1.Spanner.Commit] or + /// [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not + /// permitted to do so). + /// + /// To execute a snapshot transaction, the client specifies a timestamp + /// bound, which tells Cloud Spanner how to choose a read timestamp. + /// + /// The types of timestamp bound are: + /// + /// - Strong (the default). + /// - Bounded staleness. + /// - Exact staleness. + /// + /// If the Cloud Spanner database to be read is geographically distributed, + /// stale read-only transactions can execute more quickly than strong + /// or read-write transactions, because they are able to execute far + /// from the leader replica. + /// + /// Each type of timestamp bound is discussed in detail below. + /// + /// Strong: Strong reads are guaranteed to see the effects of all transactions + /// that have committed before the start of the read. Furthermore, all + /// rows yielded by a single read are consistent with each other -- if + /// any part of the read observes a transaction, all parts of the read + /// see the transaction. + /// + /// Strong reads are not repeatable: two consecutive strong read-only + /// transactions might return inconsistent results if there are + /// concurrent writes. If consistency across reads is required, the + /// reads should be executed within a transaction or at an exact read + /// timestamp. + /// + /// Queries on change streams (see below for more details) must also specify + /// the strong read timestamp bound. + /// + /// See + /// [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. + /// + /// Exact staleness: + /// + /// These timestamp bounds execute reads at a user-specified + /// timestamp. Reads at a timestamp are guaranteed to see a consistent + /// prefix of the global transaction history: they observe + /// modifications done by all transactions with a commit timestamp less than or + /// equal to the read timestamp, and observe none of the modifications done by + /// transactions with a larger commit timestamp. They will block until + /// all conflicting transactions that may be assigned commit timestamps + /// <= the read timestamp have finished. + /// + /// The timestamp can either be expressed as an absolute Cloud Spanner commit + /// timestamp or a staleness relative to the current time. + /// + /// These modes do not require a "negotiation phase" to pick a + /// timestamp. As a result, they execute slightly faster than the + /// equivalent boundedly stale concurrency modes. On the other hand, + /// boundedly stale reads usually return fresher results. + /// + /// See + /// [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] + /// and + /// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness]. + /// + /// Bounded staleness: + /// + /// Bounded staleness modes allow Cloud Spanner to pick the read timestamp, + /// subject to a user-provided staleness bound. Cloud Spanner chooses the + /// newest timestamp within the staleness bound that allows execution + /// of the reads at the closest available replica without blocking. + /// + /// All rows yielded are consistent with each other -- if any part of + /// the read observes a transaction, all parts of the read see the + /// transaction. Boundedly stale reads are not repeatable: two stale + /// reads, even if they use the same staleness bound, can execute at + /// different timestamps and thus return inconsistent results. + /// + /// Boundedly stale reads execute in two phases: the first phase + /// negotiates a timestamp among all replicas needed to serve the + /// read. In the second phase, reads are executed at the negotiated + /// timestamp. + /// + /// As a result of the two phase execution, bounded staleness reads are + /// usually a little slower than comparable exact staleness + /// reads. However, they are typically able to return fresher + /// results, and are more likely to execute at the closest replica. + /// + /// Because the timestamp negotiation requires up-front knowledge of + /// which rows will be read, it can only be used with single-use + /// read-only transactions. + /// + /// See + /// [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] + /// and + /// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp]. + /// + /// Old read timestamps and garbage collection: + /// + /// Cloud Spanner continuously garbage collects deleted and overwritten data + /// in the background to reclaim storage space. This process is known + /// as "version GC". By default, version GC reclaims versions after they + /// are one hour old. Because of this, Cloud Spanner cannot perform reads + /// at read timestamps more than one hour in the past. This + /// restriction also applies to in-progress reads and/or SQL queries whose + /// timestamp become too old while executing. Reads and SQL queries with + /// too-old read timestamps fail with the error `FAILED_PRECONDITION`. + /// + /// You can configure and extend the `VERSION_RETENTION_PERIOD` of a + /// database up to a period as long as one week, which allows Cloud Spanner + /// to perform reads up to one week in the past. + /// + /// Querying change Streams: + /// + /// A Change Stream is a schema object that can be configured to watch data + /// changes on the entire database, a set of tables, or a set of columns + /// in a database. + /// + /// When a change stream is created, Spanner automatically defines a + /// corresponding SQL Table-Valued Function (TVF) that can be used to query + /// the change records in the associated change stream using the + /// ExecuteStreamingSql API. The name of the TVF for a change stream is + /// generated from the name of the change stream: READ_<change_stream_name>. + /// + /// All queries on change stream TVFs must be executed using the + /// ExecuteStreamingSql API with a single-use read-only transaction with a + /// strong read-only timestamp_bound. The change stream TVF allows users to + /// specify the start_timestamp and end_timestamp for the time range of + /// interest. All change records within the retention period is accessible + /// using the strong read-only timestamp_bound. All other TransactionOptions + /// are invalid for change stream queries. + /// + /// In addition, if TransactionOptions.read_only.return_read_timestamp is set + /// to true, a special value of 2^63 - 2 will be returned in the + /// [Transaction][google.spanner.v1.Transaction] message that describes the + /// transaction, instead of a valid read timestamp. This special value should be + /// discarded and not used for any subsequent queries. + /// + /// Please see https://cloud.google.com/spanner/docs/change-streams + /// for more details on how to query the change stream TVFs. + /// + /// Partitioned DML transactions: + /// + /// Partitioned DML transactions are used to execute DML statements with a + /// different execution strategy that provides different, and often better, + /// scalability properties for large, table-wide operations than DML in a + /// ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, + /// should prefer using ReadWrite transactions. + /// + /// Partitioned DML partitions the keyspace and runs the DML statement on each + /// partition in separate, internal transactions. These transactions commit + /// automatically when complete, and run independently from one another. + /// + /// To reduce lock contention, this execution strategy only acquires read locks + /// on rows that match the WHERE clause of the statement. Additionally, the + /// smaller per-partition transactions hold locks for less time. + /// + /// That said, Partitioned DML is not a drop-in replacement for standard DML used + /// in ReadWrite transactions. + /// + /// - The DML statement must be fully-partitionable. Specifically, the statement + /// must be expressible as the union of many statements which each access only + /// a single row of the table. + /// + /// - The statement is not applied atomically to all rows of the table. Rather, + /// the statement is applied atomically to partitions of the table, in + /// independent transactions. Secondary index rows are updated atomically + /// with the base table rows. + /// + /// - Partitioned DML does not guarantee exactly-once execution semantics + /// against a partition. The statement will be applied at least once to each + /// partition. It is strongly recommended that the DML statement should be + /// idempotent to avoid unexpected results. For instance, it is potentially + /// dangerous to run a statement such as + /// `UPDATE table SET column = column + 1` as it could be run multiple times + /// against some rows. + /// + /// - The partitions are committed automatically - there is no support for + /// Commit or Rollback. If the call returns an error, or if the client issuing + /// the ExecuteSql call dies, it is possible that some rows had the statement + /// executed on them successfully. It is also possible that statement was + /// never executed against other rows. + /// + /// - Partitioned DML transactions may only contain the execution of a single + /// DML statement via ExecuteSql or ExecuteStreamingSql. + /// + /// - If any error is encountered during the execution of the partitioned DML + /// operation (for instance, a UNIQUE INDEX violation, division by zero, or a + /// value that cannot be stored due to schema constraints), then the + /// operation is stopped at that point and an error is returned. It is + /// possible that at this point, some partitions have been committed (or even + /// committed multiple times), and other partitions have not been run at all. + /// + /// Given the above, Partitioned DML is good fit for large, database-wide, + /// operations that are idempotent, such as deleting old rows from a very large + /// table. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TransactionOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TransactionOptions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionOptions(TransactionOptions other) : this() { + excludeTxnFromChangeStreams_ = other.excludeTxnFromChangeStreams_; + switch (other.ModeCase) { + case ModeOneofCase.ReadWrite: + ReadWrite = other.ReadWrite.Clone(); + break; + case ModeOneofCase.PartitionedDml: + PartitionedDml = other.PartitionedDml.Clone(); + break; + case ModeOneofCase.ReadOnly: + ReadOnly = other.ReadOnly.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionOptions Clone() { + return new TransactionOptions(this); + } + + /// Field number for the "read_write" field. + public const int ReadWriteFieldNumber = 1; + /// + /// Transaction may write. + /// + /// Authorization to begin a read-write transaction requires + /// `spanner.databases.beginOrRollbackReadWriteTransaction` permission + /// on the `session` resource. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite ReadWrite { + get { return modeCase_ == ModeOneofCase.ReadWrite ? (global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite) mode_ : null; } + set { + mode_ = value; + modeCase_ = value == null ? ModeOneofCase.None : ModeOneofCase.ReadWrite; + } + } + + /// Field number for the "partitioned_dml" field. + public const int PartitionedDmlFieldNumber = 3; + /// + /// Partitioned DML transaction. + /// + /// Authorization to begin a Partitioned DML transaction requires + /// `spanner.databases.beginPartitionedDmlTransaction` permission + /// on the `session` resource. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml PartitionedDml { + get { return modeCase_ == ModeOneofCase.PartitionedDml ? (global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml) mode_ : null; } + set { + mode_ = value; + modeCase_ = value == null ? ModeOneofCase.None : ModeOneofCase.PartitionedDml; + } + } + + /// Field number for the "read_only" field. + public const int ReadOnlyFieldNumber = 2; + /// + /// Transaction will not write. + /// + /// Authorization to begin a read-only transaction requires + /// `spanner.databases.beginReadOnlyTransaction` permission + /// on the `session` resource. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly ReadOnly { + get { return modeCase_ == ModeOneofCase.ReadOnly ? (global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly) mode_ : null; } + set { + mode_ = value; + modeCase_ = value == null ? ModeOneofCase.None : ModeOneofCase.ReadOnly; + } + } + + /// Field number for the "exclude_txn_from_change_streams" field. + public const int ExcludeTxnFromChangeStreamsFieldNumber = 5; + private bool excludeTxnFromChangeStreams_; + /// + /// When `exclude_txn_from_change_streams` is set to `true`: + /// * Mutations from this transaction will not be recorded in change streams + /// with DDL option `allow_txn_exclusion=true` that are tracking columns + /// modified by these transactions. + /// * Mutations from this transaction will be recorded in change streams with + /// DDL option `allow_txn_exclusion=false or not set` that are tracking + /// columns modified by these transactions. + /// + /// When `exclude_txn_from_change_streams` is set to `false` or not set, + /// mutations from this transaction will be recorded in all change streams that + /// are tracking columns modified by these transactions. + /// `exclude_txn_from_change_streams` may only be specified for read-write or + /// partitioned-dml transactions, otherwise the API will return an + /// `INVALID_ARGUMENT` error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ExcludeTxnFromChangeStreams { + get { return excludeTxnFromChangeStreams_; } + set { + excludeTxnFromChangeStreams_ = value; + } + } + + private object mode_; + /// Enum of possible cases for the "mode" oneof. + public enum ModeOneofCase { + None = 0, + ReadWrite = 1, + PartitionedDml = 3, + ReadOnly = 2, + } + private ModeOneofCase modeCase_ = ModeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModeOneofCase ModeCase { + get { return modeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMode() { + modeCase_ = ModeOneofCase.None; + mode_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TransactionOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TransactionOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ReadWrite, other.ReadWrite)) return false; + if (!object.Equals(PartitionedDml, other.PartitionedDml)) return false; + if (!object.Equals(ReadOnly, other.ReadOnly)) return false; + if (ExcludeTxnFromChangeStreams != other.ExcludeTxnFromChangeStreams) return false; + if (ModeCase != other.ModeCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (modeCase_ == ModeOneofCase.ReadWrite) hash ^= ReadWrite.GetHashCode(); + if (modeCase_ == ModeOneofCase.PartitionedDml) hash ^= PartitionedDml.GetHashCode(); + if (modeCase_ == ModeOneofCase.ReadOnly) hash ^= ReadOnly.GetHashCode(); + if (ExcludeTxnFromChangeStreams != false) hash ^= ExcludeTxnFromChangeStreams.GetHashCode(); + hash ^= (int) modeCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (modeCase_ == ModeOneofCase.ReadWrite) { + output.WriteRawTag(10); + output.WriteMessage(ReadWrite); + } + if (modeCase_ == ModeOneofCase.ReadOnly) { + output.WriteRawTag(18); + output.WriteMessage(ReadOnly); + } + if (modeCase_ == ModeOneofCase.PartitionedDml) { + output.WriteRawTag(26); + output.WriteMessage(PartitionedDml); + } + if (ExcludeTxnFromChangeStreams != false) { + output.WriteRawTag(40); + output.WriteBool(ExcludeTxnFromChangeStreams); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (modeCase_ == ModeOneofCase.ReadWrite) { + output.WriteRawTag(10); + output.WriteMessage(ReadWrite); + } + if (modeCase_ == ModeOneofCase.ReadOnly) { + output.WriteRawTag(18); + output.WriteMessage(ReadOnly); + } + if (modeCase_ == ModeOneofCase.PartitionedDml) { + output.WriteRawTag(26); + output.WriteMessage(PartitionedDml); + } + if (ExcludeTxnFromChangeStreams != false) { + output.WriteRawTag(40); + output.WriteBool(ExcludeTxnFromChangeStreams); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (modeCase_ == ModeOneofCase.ReadWrite) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReadWrite); + } + if (modeCase_ == ModeOneofCase.PartitionedDml) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PartitionedDml); + } + if (modeCase_ == ModeOneofCase.ReadOnly) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReadOnly); + } + if (ExcludeTxnFromChangeStreams != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TransactionOptions other) { + if (other == null) { + return; + } + if (other.ExcludeTxnFromChangeStreams != false) { + ExcludeTxnFromChangeStreams = other.ExcludeTxnFromChangeStreams; + } + switch (other.ModeCase) { + case ModeOneofCase.ReadWrite: + if (ReadWrite == null) { + ReadWrite = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite(); + } + ReadWrite.MergeFrom(other.ReadWrite); + break; + case ModeOneofCase.PartitionedDml: + if (PartitionedDml == null) { + PartitionedDml = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml(); + } + PartitionedDml.MergeFrom(other.PartitionedDml); + break; + case ModeOneofCase.ReadOnly: + if (ReadOnly == null) { + ReadOnly = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly(); + } + ReadOnly.MergeFrom(other.ReadOnly); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite(); + if (modeCase_ == ModeOneofCase.ReadWrite) { + subBuilder.MergeFrom(ReadWrite); + } + input.ReadMessage(subBuilder); + ReadWrite = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly(); + if (modeCase_ == ModeOneofCase.ReadOnly) { + subBuilder.MergeFrom(ReadOnly); + } + input.ReadMessage(subBuilder); + ReadOnly = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml(); + if (modeCase_ == ModeOneofCase.PartitionedDml) { + subBuilder.MergeFrom(PartitionedDml); + } + input.ReadMessage(subBuilder); + PartitionedDml = subBuilder; + break; + } + case 40: { + ExcludeTxnFromChangeStreams = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite(); + if (modeCase_ == ModeOneofCase.ReadWrite) { + subBuilder.MergeFrom(ReadWrite); + } + input.ReadMessage(subBuilder); + ReadWrite = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadOnly(); + if (modeCase_ == ModeOneofCase.ReadOnly) { + subBuilder.MergeFrom(ReadOnly); + } + input.ReadMessage(subBuilder); + ReadOnly = subBuilder; + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions.Types.PartitionedDml(); + if (modeCase_ == ModeOneofCase.PartitionedDml) { + subBuilder.MergeFrom(PartitionedDml); + } + input.ReadMessage(subBuilder); + PartitionedDml = subBuilder; + break; + } + case 40: { + ExcludeTxnFromChangeStreams = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the TransactionOptions message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Message type to initiate a read-write transaction. Currently this + /// transaction type has no options. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReadWrite : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReadWrite()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionOptions.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadWrite() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadWrite(ReadWrite other) : this() { + readLockMode_ = other.readLockMode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadWrite Clone() { + return new ReadWrite(this); + } + + /// Field number for the "read_lock_mode" field. + public const int ReadLockModeFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode readLockMode_ = global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified; + /// + /// Read lock mode for the transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode ReadLockMode { + get { return readLockMode_; } + set { + readLockMode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReadWrite); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReadWrite other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ReadLockMode != other.ReadLockMode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ReadLockMode != global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified) hash ^= ReadLockMode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ReadLockMode != global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ReadLockMode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ReadLockMode != global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ReadLockMode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ReadLockMode != global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ReadLockMode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReadWrite other) { + if (other == null) { + return; + } + if (other.ReadLockMode != global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode.Unspecified) { + ReadLockMode = other.ReadLockMode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ReadLockMode = (global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ReadLockMode = (global::Google.Cloud.Spanner.V1.TransactionOptions.Types.ReadWrite.Types.ReadLockMode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ReadWrite message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// `ReadLockMode` is used to set the read lock mode for read-write + /// transactions. + /// + public enum ReadLockMode { + /// + /// Default value. + /// + /// If the value is not specified, the pessimistic read lock is used. + /// + [pbr::OriginalName("READ_LOCK_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Pessimistic lock mode. + /// + /// Read locks are acquired immediately on read. + /// + [pbr::OriginalName("PESSIMISTIC")] Pessimistic = 1, + /// + /// Optimistic lock mode. + /// + /// Locks for reads within the transaction are not acquired on read. + /// Instead the locks are acquired on a commit to validate that + /// read/queried data has not changed since the transaction started. + /// + [pbr::OriginalName("OPTIMISTIC")] Optimistic = 2, + } + + } + #endregion + + } + + /// + /// Message type to initiate a Partitioned DML transaction. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PartitionedDml : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PartitionedDml()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionOptions.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionedDml() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionedDml(PartitionedDml other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PartitionedDml Clone() { + return new PartitionedDml(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PartitionedDml); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PartitionedDml other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PartitionedDml other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Message type to initiate a read-only transaction. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReadOnly : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReadOnly()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionOptions.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadOnly() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadOnly(ReadOnly other) : this() { + returnReadTimestamp_ = other.returnReadTimestamp_; + switch (other.TimestampBoundCase) { + case TimestampBoundOneofCase.Strong: + Strong = other.Strong; + break; + case TimestampBoundOneofCase.MinReadTimestamp: + MinReadTimestamp = other.MinReadTimestamp.Clone(); + break; + case TimestampBoundOneofCase.MaxStaleness: + MaxStaleness = other.MaxStaleness.Clone(); + break; + case TimestampBoundOneofCase.ReadTimestamp: + ReadTimestamp = other.ReadTimestamp.Clone(); + break; + case TimestampBoundOneofCase.ExactStaleness: + ExactStaleness = other.ExactStaleness.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReadOnly Clone() { + return new ReadOnly(this); + } + + /// Field number for the "strong" field. + public const int StrongFieldNumber = 1; + /// + /// Read at a timestamp where all previously committed transactions + /// are visible. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Strong { + get { return HasStrong ? (bool) timestampBound_ : false; } + set { + timestampBound_ = value; + timestampBoundCase_ = TimestampBoundOneofCase.Strong; + } + } + /// Gets whether the "strong" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasStrong { + get { return timestampBoundCase_ == TimestampBoundOneofCase.Strong; } + } + /// Clears the value of the oneof if it's currently set to "strong" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStrong() { + if (HasStrong) { + ClearTimestampBound(); + } + } + + /// Field number for the "min_read_timestamp" field. + public const int MinReadTimestampFieldNumber = 2; + /// + /// Executes all reads at a timestamp >= `min_read_timestamp`. + /// + /// This is useful for requesting fresher data than some previous + /// read, or data that is fresh enough to observe the effects of some + /// previously committed transaction whose timestamp is known. + /// + /// Note that this option can only be used in single-use transactions. + /// + /// A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + /// Example: `"2014-10-02T15:01:23.045123456Z"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp MinReadTimestamp { + get { return timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp ? (global::Google.Protobuf.WellKnownTypes.Timestamp) timestampBound_ : null; } + set { + timestampBound_ = value; + timestampBoundCase_ = value == null ? TimestampBoundOneofCase.None : TimestampBoundOneofCase.MinReadTimestamp; + } + } + + /// Field number for the "max_staleness" field. + public const int MaxStalenessFieldNumber = 3; + /// + /// Read data at a timestamp >= `NOW - max_staleness` + /// seconds. Guarantees that all writes that have committed more + /// than the specified number of seconds ago are visible. Because + /// Cloud Spanner chooses the exact timestamp, this mode works even if + /// the client's local clock is substantially skewed from Cloud Spanner + /// commit timestamps. + /// + /// Useful for reading the freshest data available at a nearby + /// replica, while bounding the possible staleness if the local + /// replica has fallen behind. + /// + /// Note that this option can only be used in single-use + /// transactions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration MaxStaleness { + get { return timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness ? (global::Google.Protobuf.WellKnownTypes.Duration) timestampBound_ : null; } + set { + timestampBound_ = value; + timestampBoundCase_ = value == null ? TimestampBoundOneofCase.None : TimestampBoundOneofCase.MaxStaleness; + } + } + + /// Field number for the "read_timestamp" field. + public const int ReadTimestampFieldNumber = 4; + /// + /// Executes all reads at the given timestamp. Unlike other modes, + /// reads at a specific timestamp are repeatable; the same read at + /// the same timestamp always returns the same data. If the + /// timestamp is in the future, the read will block until the + /// specified timestamp, modulo the read's deadline. + /// + /// Useful for large scale consistent reads such as mapreduces, or + /// for coordinating many reads against a consistent snapshot of the + /// data. + /// + /// A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + /// Example: `"2014-10-02T15:01:23.045123456Z"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp ReadTimestamp { + get { return timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp ? (global::Google.Protobuf.WellKnownTypes.Timestamp) timestampBound_ : null; } + set { + timestampBound_ = value; + timestampBoundCase_ = value == null ? TimestampBoundOneofCase.None : TimestampBoundOneofCase.ReadTimestamp; + } + } + + /// Field number for the "exact_staleness" field. + public const int ExactStalenessFieldNumber = 5; + /// + /// Executes all reads at a timestamp that is `exact_staleness` + /// old. The timestamp is chosen soon after the read is started. + /// + /// Guarantees that all writes that have committed more than the + /// specified number of seconds ago are visible. Because Cloud Spanner + /// chooses the exact timestamp, this mode works even if the client's + /// local clock is substantially skewed from Cloud Spanner commit + /// timestamps. + /// + /// Useful for reading at nearby replicas without the distributed + /// timestamp negotiation overhead of `max_staleness`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Duration ExactStaleness { + get { return timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness ? (global::Google.Protobuf.WellKnownTypes.Duration) timestampBound_ : null; } + set { + timestampBound_ = value; + timestampBoundCase_ = value == null ? TimestampBoundOneofCase.None : TimestampBoundOneofCase.ExactStaleness; + } + } + + /// Field number for the "return_read_timestamp" field. + public const int ReturnReadTimestampFieldNumber = 6; + private bool returnReadTimestamp_; + /// + /// If true, the Cloud Spanner-selected read timestamp is included in + /// the [Transaction][google.spanner.v1.Transaction] message that describes + /// the transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ReturnReadTimestamp { + get { return returnReadTimestamp_; } + set { + returnReadTimestamp_ = value; + } + } + + private object timestampBound_; + /// Enum of possible cases for the "timestamp_bound" oneof. + public enum TimestampBoundOneofCase { + None = 0, + Strong = 1, + MinReadTimestamp = 2, + MaxStaleness = 3, + ReadTimestamp = 4, + ExactStaleness = 5, + } + private TimestampBoundOneofCase timestampBoundCase_ = TimestampBoundOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimestampBoundOneofCase TimestampBoundCase { + get { return timestampBoundCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTimestampBound() { + timestampBoundCase_ = TimestampBoundOneofCase.None; + timestampBound_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReadOnly); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReadOnly other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Strong != other.Strong) return false; + if (!object.Equals(MinReadTimestamp, other.MinReadTimestamp)) return false; + if (!object.Equals(MaxStaleness, other.MaxStaleness)) return false; + if (!object.Equals(ReadTimestamp, other.ReadTimestamp)) return false; + if (!object.Equals(ExactStaleness, other.ExactStaleness)) return false; + if (ReturnReadTimestamp != other.ReturnReadTimestamp) return false; + if (TimestampBoundCase != other.TimestampBoundCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasStrong) hash ^= Strong.GetHashCode(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) hash ^= MinReadTimestamp.GetHashCode(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) hash ^= MaxStaleness.GetHashCode(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) hash ^= ReadTimestamp.GetHashCode(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) hash ^= ExactStaleness.GetHashCode(); + if (ReturnReadTimestamp != false) hash ^= ReturnReadTimestamp.GetHashCode(); + hash ^= (int) timestampBoundCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasStrong) { + output.WriteRawTag(8); + output.WriteBool(Strong); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) { + output.WriteRawTag(18); + output.WriteMessage(MinReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) { + output.WriteRawTag(26); + output.WriteMessage(MaxStaleness); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) { + output.WriteRawTag(34); + output.WriteMessage(ReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) { + output.WriteRawTag(42); + output.WriteMessage(ExactStaleness); + } + if (ReturnReadTimestamp != false) { + output.WriteRawTag(48); + output.WriteBool(ReturnReadTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasStrong) { + output.WriteRawTag(8); + output.WriteBool(Strong); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) { + output.WriteRawTag(18); + output.WriteMessage(MinReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) { + output.WriteRawTag(26); + output.WriteMessage(MaxStaleness); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) { + output.WriteRawTag(34); + output.WriteMessage(ReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) { + output.WriteRawTag(42); + output.WriteMessage(ExactStaleness); + } + if (ReturnReadTimestamp != false) { + output.WriteRawTag(48); + output.WriteBool(ReturnReadTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasStrong) { + size += 1 + 1; + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MinReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MaxStaleness); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReadTimestamp); + } + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExactStaleness); + } + if (ReturnReadTimestamp != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReadOnly other) { + if (other == null) { + return; + } + if (other.ReturnReadTimestamp != false) { + ReturnReadTimestamp = other.ReturnReadTimestamp; + } + switch (other.TimestampBoundCase) { + case TimestampBoundOneofCase.Strong: + Strong = other.Strong; + break; + case TimestampBoundOneofCase.MinReadTimestamp: + if (MinReadTimestamp == null) { + MinReadTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + MinReadTimestamp.MergeFrom(other.MinReadTimestamp); + break; + case TimestampBoundOneofCase.MaxStaleness: + if (MaxStaleness == null) { + MaxStaleness = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + MaxStaleness.MergeFrom(other.MaxStaleness); + break; + case TimestampBoundOneofCase.ReadTimestamp: + if (ReadTimestamp == null) { + ReadTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + ReadTimestamp.MergeFrom(other.ReadTimestamp); + break; + case TimestampBoundOneofCase.ExactStaleness: + if (ExactStaleness == null) { + ExactStaleness = new global::Google.Protobuf.WellKnownTypes.Duration(); + } + ExactStaleness.MergeFrom(other.ExactStaleness); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Strong = input.ReadBool(); + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) { + subBuilder.MergeFrom(MinReadTimestamp); + } + input.ReadMessage(subBuilder); + MinReadTimestamp = subBuilder; + break; + } + case 26: { + global::Google.Protobuf.WellKnownTypes.Duration subBuilder = new global::Google.Protobuf.WellKnownTypes.Duration(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) { + subBuilder.MergeFrom(MaxStaleness); + } + input.ReadMessage(subBuilder); + MaxStaleness = subBuilder; + break; + } + case 34: { + global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) { + subBuilder.MergeFrom(ReadTimestamp); + } + input.ReadMessage(subBuilder); + ReadTimestamp = subBuilder; + break; + } + case 42: { + global::Google.Protobuf.WellKnownTypes.Duration subBuilder = new global::Google.Protobuf.WellKnownTypes.Duration(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) { + subBuilder.MergeFrom(ExactStaleness); + } + input.ReadMessage(subBuilder); + ExactStaleness = subBuilder; + break; + } + case 48: { + ReturnReadTimestamp = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Strong = input.ReadBool(); + break; + } + case 18: { + global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MinReadTimestamp) { + subBuilder.MergeFrom(MinReadTimestamp); + } + input.ReadMessage(subBuilder); + MinReadTimestamp = subBuilder; + break; + } + case 26: { + global::Google.Protobuf.WellKnownTypes.Duration subBuilder = new global::Google.Protobuf.WellKnownTypes.Duration(); + if (timestampBoundCase_ == TimestampBoundOneofCase.MaxStaleness) { + subBuilder.MergeFrom(MaxStaleness); + } + input.ReadMessage(subBuilder); + MaxStaleness = subBuilder; + break; + } + case 34: { + global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ReadTimestamp) { + subBuilder.MergeFrom(ReadTimestamp); + } + input.ReadMessage(subBuilder); + ReadTimestamp = subBuilder; + break; + } + case 42: { + global::Google.Protobuf.WellKnownTypes.Duration subBuilder = new global::Google.Protobuf.WellKnownTypes.Duration(); + if (timestampBoundCase_ == TimestampBoundOneofCase.ExactStaleness) { + subBuilder.MergeFrom(ExactStaleness); + } + input.ReadMessage(subBuilder); + ExactStaleness = subBuilder; + break; + } + case 48: { + ReturnReadTimestamp = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// A transaction. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Transaction : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Transaction()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Transaction() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Transaction(Transaction other) : this() { + id_ = other.id_; + readTimestamp_ = other.readTimestamp_ != null ? other.readTimestamp_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Transaction Clone() { + return new Transaction(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private pb::ByteString id_ = pb::ByteString.Empty; + /// + /// `id` may be used to identify the transaction in subsequent + /// [Read][google.spanner.v1.Spanner.Read], + /// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], + /// [Commit][google.spanner.v1.Spanner.Commit], or + /// [Rollback][google.spanner.v1.Spanner.Rollback] calls. + /// + /// Single-use read-only transactions do not have IDs, because + /// single-use transactions do not support multiple requests. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "read_timestamp" field. + public const int ReadTimestampFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp readTimestamp_; + /// + /// For snapshot read-only transactions, the read timestamp chosen + /// for the transaction. Not returned by default: see + /// [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. + /// + /// A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + /// Example: `"2014-10-02T15:01:23.045123456Z"`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp ReadTimestamp { + get { return readTimestamp_; } + set { + readTimestamp_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Transaction); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Transaction other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!object.Equals(ReadTimestamp, other.ReadTimestamp)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (readTimestamp_ != null) hash ^= ReadTimestamp.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Id); + } + if (readTimestamp_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ReadTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Id); + } + if (readTimestamp_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ReadTimestamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Id); + } + if (readTimestamp_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReadTimestamp); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Transaction other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.readTimestamp_ != null) { + if (readTimestamp_ == null) { + ReadTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + ReadTimestamp.MergeFrom(other.ReadTimestamp); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadBytes(); + break; + } + case 18: { + if (readTimestamp_ == null) { + ReadTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(ReadTimestamp); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadBytes(); + break; + } + case 18: { + if (readTimestamp_ == null) { + ReadTimestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(ReadTimestamp); + break; + } + } + } + } + #endif + + } + + /// + /// This message is used to select the transaction in which a + /// [Read][google.spanner.v1.Spanner.Read] or + /// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. + /// + /// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more + /// information about transactions. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TransactionSelector : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TransactionSelector()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionSelector() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionSelector(TransactionSelector other) : this() { + switch (other.SelectorCase) { + case SelectorOneofCase.SingleUse: + SingleUse = other.SingleUse.Clone(); + break; + case SelectorOneofCase.Id: + Id = other.Id; + break; + case SelectorOneofCase.Begin: + Begin = other.Begin.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransactionSelector Clone() { + return new TransactionSelector(this); + } + + /// Field number for the "single_use" field. + public const int SingleUseFieldNumber = 1; + /// + /// Execute the read or SQL query in a temporary transaction. + /// This is the most efficient way to execute a transaction that + /// consists of a single SQL query. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions SingleUse { + get { return selectorCase_ == SelectorOneofCase.SingleUse ? (global::Google.Cloud.Spanner.V1.TransactionOptions) selector_ : null; } + set { + selector_ = value; + selectorCase_ = value == null ? SelectorOneofCase.None : SelectorOneofCase.SingleUse; + } + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 2; + /// + /// Execute the read or SQL query in a previously-started transaction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Id { + get { return HasId ? (pb::ByteString) selector_ : pb::ByteString.Empty; } + set { + selector_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + selectorCase_ = SelectorOneofCase.Id; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return selectorCase_ == SelectorOneofCase.Id; } + } + /// Clears the value of the oneof if it's currently set to "id" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + if (HasId) { + ClearSelector(); + } + } + + /// Field number for the "begin" field. + public const int BeginFieldNumber = 3; + /// + /// Begin a new transaction and execute this read or SQL query in + /// it. The transaction ID of the new transaction is returned in + /// [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], + /// which is a [Transaction][google.spanner.v1.Transaction]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TransactionOptions Begin { + get { return selectorCase_ == SelectorOneofCase.Begin ? (global::Google.Cloud.Spanner.V1.TransactionOptions) selector_ : null; } + set { + selector_ = value; + selectorCase_ = value == null ? SelectorOneofCase.None : SelectorOneofCase.Begin; + } + } + + private object selector_; + /// Enum of possible cases for the "selector" oneof. + public enum SelectorOneofCase { + None = 0, + SingleUse = 1, + Id = 2, + Begin = 3, + } + private SelectorOneofCase selectorCase_ = SelectorOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectorOneofCase SelectorCase { + get { return selectorCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSelector() { + selectorCase_ = SelectorOneofCase.None; + selector_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TransactionSelector); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TransactionSelector other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(SingleUse, other.SingleUse)) return false; + if (Id != other.Id) return false; + if (!object.Equals(Begin, other.Begin)) return false; + if (SelectorCase != other.SelectorCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (selectorCase_ == SelectorOneofCase.SingleUse) hash ^= SingleUse.GetHashCode(); + if (HasId) hash ^= Id.GetHashCode(); + if (selectorCase_ == SelectorOneofCase.Begin) hash ^= Begin.GetHashCode(); + hash ^= (int) selectorCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (selectorCase_ == SelectorOneofCase.SingleUse) { + output.WriteRawTag(10); + output.WriteMessage(SingleUse); + } + if (HasId) { + output.WriteRawTag(18); + output.WriteBytes(Id); + } + if (selectorCase_ == SelectorOneofCase.Begin) { + output.WriteRawTag(26); + output.WriteMessage(Begin); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (selectorCase_ == SelectorOneofCase.SingleUse) { + output.WriteRawTag(10); + output.WriteMessage(SingleUse); + } + if (HasId) { + output.WriteRawTag(18); + output.WriteBytes(Id); + } + if (selectorCase_ == SelectorOneofCase.Begin) { + output.WriteRawTag(26); + output.WriteMessage(Begin); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (selectorCase_ == SelectorOneofCase.SingleUse) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SingleUse); + } + if (HasId) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Id); + } + if (selectorCase_ == SelectorOneofCase.Begin) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Begin); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TransactionSelector other) { + if (other == null) { + return; + } + switch (other.SelectorCase) { + case SelectorOneofCase.SingleUse: + if (SingleUse == null) { + SingleUse = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + SingleUse.MergeFrom(other.SingleUse); + break; + case SelectorOneofCase.Id: + Id = other.Id; + break; + case SelectorOneofCase.Begin: + if (Begin == null) { + Begin = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + } + Begin.MergeFrom(other.Begin); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (selectorCase_ == SelectorOneofCase.SingleUse) { + subBuilder.MergeFrom(SingleUse); + } + input.ReadMessage(subBuilder); + SingleUse = subBuilder; + break; + } + case 18: { + Id = input.ReadBytes(); + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (selectorCase_ == SelectorOneofCase.Begin) { + subBuilder.MergeFrom(Begin); + } + input.ReadMessage(subBuilder); + Begin = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (selectorCase_ == SelectorOneofCase.SingleUse) { + subBuilder.MergeFrom(SingleUse); + } + input.ReadMessage(subBuilder); + SingleUse = subBuilder; + break; + } + case 18: { + Id = input.ReadBytes(); + break; + } + case 26: { + global::Google.Cloud.Spanner.V1.TransactionOptions subBuilder = new global::Google.Cloud.Spanner.V1.TransactionOptions(); + if (selectorCase_ == SelectorOneofCase.Begin) { + subBuilder.MergeFrom(Begin); + } + input.ReadMessage(subBuilder); + Begin = subBuilder; + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Type.g.cs b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Type.g.cs new file mode 100755 index 000000000000..732b49b27d6c --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Type.g.cs @@ -0,0 +1,1041 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/type.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Spanner.V1 { + + /// Holder for reflection information generated from google/spanner/v1/type.proto + public static partial class TypeReflection { + + #region Descriptor + /// File descriptor for google/spanner/v1/type.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TypeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Chxnb29nbGUvc3Bhbm5lci92MS90eXBlLnByb3RvEhFnb29nbGUuc3Bhbm5l", + "ci52MRofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90byL3AQoEVHlw", + "ZRIuCgRjb2RlGAEgASgOMhsuZ29vZ2xlLnNwYW5uZXIudjEuVHlwZUNvZGVC", + "A+BBAhIzChJhcnJheV9lbGVtZW50X3R5cGUYAiABKAsyFy5nb29nbGUuc3Bh", + "bm5lci52MS5UeXBlEjIKC3N0cnVjdF90eXBlGAMgASgLMh0uZ29vZ2xlLnNw", + "YW5uZXIudjEuU3RydWN0VHlwZRI+Cg90eXBlX2Fubm90YXRpb24YBCABKA4y", + "JS5nb29nbGUuc3Bhbm5lci52MS5UeXBlQW5ub3RhdGlvbkNvZGUSFgoOcHJv", + "dG9fdHlwZV9mcW4YBSABKAkifwoKU3RydWN0VHlwZRIzCgZmaWVsZHMYASAD", + "KAsyIy5nb29nbGUuc3Bhbm5lci52MS5TdHJ1Y3RUeXBlLkZpZWxkGjwKBUZp", + "ZWxkEgwKBG5hbWUYASABKAkSJQoEdHlwZRgCIAEoCzIXLmdvb2dsZS5zcGFu", + "bmVyLnYxLlR5cGUqxwEKCFR5cGVDb2RlEhkKFVRZUEVfQ09ERV9VTlNQRUNJ", + "RklFRBAAEggKBEJPT0wQARIJCgVJTlQ2NBACEgsKB0ZMT0FUNjQQAxILCgdG", + "TE9BVDMyEA8SDQoJVElNRVNUQU1QEAQSCAoEREFURRAFEgoKBlNUUklORxAG", + "EgkKBUJZVEVTEAcSCQoFQVJSQVkQCBIKCgZTVFJVQ1QQCRILCgdOVU1FUklD", + "EAoSCAoESlNPThALEgkKBVBST1RPEA0SCAoERU5VTRAOKmQKElR5cGVBbm5v", + "dGF0aW9uQ29kZRIkCiBUWVBFX0FOTk9UQVRJT05fQ09ERV9VTlNQRUNJRklF", + "RBAAEg4KClBHX05VTUVSSUMQAhIMCghQR19KU09OQhADEgoKBlBHX09JRBAE", + "QqwBChVjb20uZ29vZ2xlLnNwYW5uZXIudjFCCVR5cGVQcm90b1ABWjVjbG91", + "ZC5nb29nbGUuY29tL2dvL3NwYW5uZXIvYXBpdjEvc3Bhbm5lcnBiO3NwYW5u", + "ZXJwYqoCF0dvb2dsZS5DbG91ZC5TcGFubmVyLlYxygIXR29vZ2xlXENsb3Vk", + "XFNwYW5uZXJcVjHqAhpHb29nbGU6OkNsb3VkOjpTcGFubmVyOjpWMWIGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Spanner.V1.TypeCode), typeof(global::Google.Cloud.Spanner.V1.TypeAnnotationCode), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Type), global::Google.Cloud.Spanner.V1.Type.Parser, new[]{ "Code", "ArrayElementType", "StructType", "TypeAnnotation", "ProtoTypeFqn" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.StructType), global::Google.Cloud.Spanner.V1.StructType.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.StructType.Types.Field), global::Google.Cloud.Spanner.V1.StructType.Types.Field.Parser, new[]{ "Name", "Type" }, null, null, null, null)}) + })); + } + #endregion + + } + #region Enums + /// + /// `TypeCode` is used as part of [Type][google.spanner.v1.Type] to + /// indicate the type of a Cloud Spanner value. + /// + /// Each legal value of a type can be encoded to or decoded from a JSON + /// value, using the encodings described below. All Cloud Spanner values can + /// be `null`, regardless of type; `null`s are always encoded as a JSON + /// `null`. + /// + public enum TypeCode { + /// + /// Not specified. + /// + [pbr::OriginalName("TYPE_CODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Encoded as JSON `true` or `false`. + /// + [pbr::OriginalName("BOOL")] Bool = 1, + /// + /// Encoded as `string`, in decimal format. + /// + [pbr::OriginalName("INT64")] Int64 = 2, + /// + /// Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + /// `"-Infinity"`. + /// + [pbr::OriginalName("FLOAT64")] Float64 = 3, + /// + /// Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + /// `"-Infinity"`. + /// + [pbr::OriginalName("FLOAT32")] Float32 = 15, + /// + /// Encoded as `string` in RFC 3339 timestamp format. The time zone + /// must be present, and must be `"Z"`. + /// + /// If the schema has the column option + /// `allow_commit_timestamp=true`, the placeholder string + /// `"spanner.commit_timestamp()"` can be used to instruct the system + /// to insert the commit timestamp associated with the transaction + /// commit. + /// + [pbr::OriginalName("TIMESTAMP")] Timestamp = 4, + /// + /// Encoded as `string` in RFC 3339 date format. + /// + [pbr::OriginalName("DATE")] Date = 5, + /// + /// Encoded as `string`. + /// + [pbr::OriginalName("STRING")] String = 6, + /// + /// Encoded as a base64-encoded `string`, as described in RFC 4648, + /// section 4. + /// + [pbr::OriginalName("BYTES")] Bytes = 7, + /// + /// Encoded as `list`, where the list elements are represented + /// according to + /// [array_element_type][google.spanner.v1.Type.array_element_type]. + /// + [pbr::OriginalName("ARRAY")] Array = 8, + /// + /// Encoded as `list`, where list element `i` is represented according + /// to [struct_type.fields[i]][google.spanner.v1.StructType.fields]. + /// + [pbr::OriginalName("STRUCT")] Struct = 9, + /// + /// Encoded as `string`, in decimal format or scientific notation format. + /// <br>Decimal format: + /// <br>`[+-]Digits[.[Digits]]` or + /// <br>`[+-][Digits].Digits` + /// + /// Scientific notation: + /// <br>`[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or + /// <br>`[+-][Digits].Digits[ExponentIndicator[+-]Digits]` + /// <br>(ExponentIndicator is `"e"` or `"E"`) + /// + [pbr::OriginalName("NUMERIC")] Numeric = 10, + /// + /// Encoded as a JSON-formatted `string` as described in RFC 7159. The + /// following rules are applied when parsing JSON input: + /// + /// - Whitespace characters are not preserved. + /// - If a JSON object has duplicate keys, only the first key is preserved. + /// - Members of a JSON object are not guaranteed to have their order + /// preserved. + /// - JSON array elements will have their order preserved. + /// + [pbr::OriginalName("JSON")] Json = 11, + /// + /// Encoded as a base64-encoded `string`, as described in RFC 4648, + /// section 4. + /// + [pbr::OriginalName("PROTO")] Proto = 13, + /// + /// Encoded as `string`, in decimal format. + /// + [pbr::OriginalName("ENUM")] Enum = 14, + } + + /// + /// `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to + /// disambiguate SQL types that should be used for a given Cloud Spanner value. + /// Disambiguation is needed because the same Cloud Spanner type can be mapped to + /// different SQL types depending on SQL dialect. TypeAnnotationCode doesn't + /// affect the way value is serialized. + /// + public enum TypeAnnotationCode { + /// + /// Not specified. + /// + [pbr::OriginalName("TYPE_ANNOTATION_CODE_UNSPECIFIED")] Unspecified = 0, + /// + /// PostgreSQL compatible NUMERIC type. This annotation needs to be applied to + /// [Type][google.spanner.v1.Type] instances having [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] + /// type code to specify that values of this type should be treated as + /// PostgreSQL NUMERIC values. Currently this annotation is always needed for + /// [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled + /// Spanner databases. + /// + [pbr::OriginalName("PG_NUMERIC")] PgNumeric = 2, + /// + /// PostgreSQL compatible JSONB type. This annotation needs to be applied to + /// [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON] + /// type code to specify that values of this type should be treated as + /// PostgreSQL JSONB values. Currently this annotation is always needed for + /// [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled + /// Spanner databases. + /// + [pbr::OriginalName("PG_JSONB")] PgJsonb = 3, + /// + /// PostgreSQL compatible OID type. This annotation can be used by a client + /// interacting with PostgreSQL-enabled Spanner database to specify that a + /// value should be treated using the semantics of the OID type. + /// + [pbr::OriginalName("PG_OID")] PgOid = 4, + } + + #endregion + + #region Messages + /// + /// `Type` indicates the type of a Cloud Spanner value, as might be stored in a + /// table cell or returned from an SQL query. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Type : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Type()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TypeReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Type() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Type(Type other) : this() { + code_ = other.code_; + arrayElementType_ = other.arrayElementType_ != null ? other.arrayElementType_.Clone() : null; + structType_ = other.structType_ != null ? other.structType_.Clone() : null; + typeAnnotation_ = other.typeAnnotation_; + protoTypeFqn_ = other.protoTypeFqn_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Type Clone() { + return new Type(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private global::Google.Cloud.Spanner.V1.TypeCode code_ = global::Google.Cloud.Spanner.V1.TypeCode.Unspecified; + /// + /// Required. The [TypeCode][google.spanner.v1.TypeCode] for this type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TypeCode Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "array_element_type" field. + public const int ArrayElementTypeFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Type arrayElementType_; + /// + /// If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` + /// is the type of the array elements. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Type ArrayElementType { + get { return arrayElementType_; } + set { + arrayElementType_ = value; + } + } + + /// Field number for the "struct_type" field. + public const int StructTypeFieldNumber = 3; + private global::Google.Cloud.Spanner.V1.StructType structType_; + /// + /// If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` + /// provides type information for the struct's fields. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.StructType StructType { + get { return structType_; } + set { + structType_ = value; + } + } + + /// Field number for the "type_annotation" field. + public const int TypeAnnotationFieldNumber = 4; + private global::Google.Cloud.Spanner.V1.TypeAnnotationCode typeAnnotation_ = global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified; + /// + /// The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will + /// use to represent values of this type during query processing. This is + /// necessary for some type codes because a single [TypeCode][google.spanner.v1.TypeCode] can be mapped + /// to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.type_annotation] + /// typically is not needed to process the content of a value (it doesn't + /// affect serialization) and clients can ignore it on the read path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.TypeAnnotationCode TypeAnnotation { + get { return typeAnnotation_; } + set { + typeAnnotation_ = value; + } + } + + /// Field number for the "proto_type_fqn" field. + public const int ProtoTypeFqnFieldNumber = 5; + private string protoTypeFqn_ = ""; + /// + /// If [code][google.spanner.v1.Type.code] == + /// [PROTO][google.spanner.v1.TypeCode.PROTO] or + /// [code][google.spanner.v1.Type.code] == + /// [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully + /// qualified name of the proto type representing the proto/enum definition. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProtoTypeFqn { + get { return protoTypeFqn_; } + set { + protoTypeFqn_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Type); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Type other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Code != other.Code) return false; + if (!object.Equals(ArrayElementType, other.ArrayElementType)) return false; + if (!object.Equals(StructType, other.StructType)) return false; + if (TypeAnnotation != other.TypeAnnotation) return false; + if (ProtoTypeFqn != other.ProtoTypeFqn) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified) hash ^= Code.GetHashCode(); + if (arrayElementType_ != null) hash ^= ArrayElementType.GetHashCode(); + if (structType_ != null) hash ^= StructType.GetHashCode(); + if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) hash ^= TypeAnnotation.GetHashCode(); + if (ProtoTypeFqn.Length != 0) hash ^= ProtoTypeFqn.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Code); + } + if (arrayElementType_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ArrayElementType); + } + if (structType_ != null) { + output.WriteRawTag(26); + output.WriteMessage(StructType); + } + if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) TypeAnnotation); + } + if (ProtoTypeFqn.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ProtoTypeFqn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Code); + } + if (arrayElementType_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ArrayElementType); + } + if (structType_ != null) { + output.WriteRawTag(26); + output.WriteMessage(StructType); + } + if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) TypeAnnotation); + } + if (ProtoTypeFqn.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ProtoTypeFqn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Code); + } + if (arrayElementType_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ArrayElementType); + } + if (structType_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StructType); + } + if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TypeAnnotation); + } + if (ProtoTypeFqn.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProtoTypeFqn); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Type other) { + if (other == null) { + return; + } + if (other.Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified) { + Code = other.Code; + } + if (other.arrayElementType_ != null) { + if (arrayElementType_ == null) { + ArrayElementType = new global::Google.Cloud.Spanner.V1.Type(); + } + ArrayElementType.MergeFrom(other.ArrayElementType); + } + if (other.structType_ != null) { + if (structType_ == null) { + StructType = new global::Google.Cloud.Spanner.V1.StructType(); + } + StructType.MergeFrom(other.StructType); + } + if (other.TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) { + TypeAnnotation = other.TypeAnnotation; + } + if (other.ProtoTypeFqn.Length != 0) { + ProtoTypeFqn = other.ProtoTypeFqn; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Code = (global::Google.Cloud.Spanner.V1.TypeCode) input.ReadEnum(); + break; + } + case 18: { + if (arrayElementType_ == null) { + ArrayElementType = new global::Google.Cloud.Spanner.V1.Type(); + } + input.ReadMessage(ArrayElementType); + break; + } + case 26: { + if (structType_ == null) { + StructType = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(StructType); + break; + } + case 32: { + TypeAnnotation = (global::Google.Cloud.Spanner.V1.TypeAnnotationCode) input.ReadEnum(); + break; + } + case 42: { + ProtoTypeFqn = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Code = (global::Google.Cloud.Spanner.V1.TypeCode) input.ReadEnum(); + break; + } + case 18: { + if (arrayElementType_ == null) { + ArrayElementType = new global::Google.Cloud.Spanner.V1.Type(); + } + input.ReadMessage(ArrayElementType); + break; + } + case 26: { + if (structType_ == null) { + StructType = new global::Google.Cloud.Spanner.V1.StructType(); + } + input.ReadMessage(StructType); + break; + } + case 32: { + TypeAnnotation = (global::Google.Cloud.Spanner.V1.TypeAnnotationCode) input.ReadEnum(); + break; + } + case 42: { + ProtoTypeFqn = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StructType : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StructType()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.TypeReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StructType() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StructType(StructType other) : this() { + fields_ = other.fields_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StructType Clone() { + return new StructType(this); + } + + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_fields_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Spanner.V1.StructType.Types.Field.Parser); + private readonly pbc::RepeatedField fields_ = new pbc::RepeatedField(); + /// + /// The list of fields that make up this struct. Order is + /// significant, because values of this struct type are represented as + /// lists, where the order of field values matches the order of + /// fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields + /// matches the order of columns in a read request, or the order of + /// fields in the `SELECT` clause of a query. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Fields { + get { return fields_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StructType); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StructType other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!fields_.Equals(other.fields_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= fields_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + fields_.WriteTo(output, _repeated_fields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + fields_.WriteTo(ref output, _repeated_fields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += fields_.CalculateSize(_repeated_fields_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StructType other) { + if (other == null) { + return; + } + fields_.Add(other.fields_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + fields_.AddEntriesFrom(input, _repeated_fields_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + fields_.AddEntriesFrom(ref input, _repeated_fields_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the StructType message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Message representing a single field of a struct. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Field : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Field()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Spanner.V1.StructType.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Field() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Field(Field other) : this() { + name_ = other.name_; + type_ = other.type_ != null ? other.type_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Field Clone() { + return new Field(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The name of the field. For reads, this is the column name. For + /// SQL queries, it is the column alias (e.g., `"Word"` in the + /// query `"SELECT 'hello' AS Word"`), or the column name (e.g., + /// `"ColName"` in the query `"SELECT ColName FROM Table"`). Some + /// columns might have an empty name (e.g., `"SELECT + /// UPPER(ColName)"`). Note that a query result can contain + /// multiple fields with the same name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private global::Google.Cloud.Spanner.V1.Type type_; + /// + /// The type of the field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Spanner.V1.Type Type { + get { return type_; } + set { + type_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Field); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Field other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(Type, other.Type)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (type_ != null) hash ^= Type.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (type_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (type_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (type_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Type); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Field other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.type_ != null) { + if (type_ == null) { + Type = new global::Google.Cloud.Spanner.V1.Type(); + } + Type.MergeFrom(other.Type); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (type_ == null) { + Type = new global::Google.Cloud.Spanner.V1.Type(); + } + input.ReadMessage(Type); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (type_ == null) { + Type = new global::Google.Cloud.Spanner.V1.Type(); + } + input.ReadMessage(Type); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.Spanner.V1/gapic_metadata.json b/owl-bot-staging/Google.Cloud.Spanner.V1/gapic_metadata.json new file mode 100755 index 000000000000..aa054cd5cdb1 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.Spanner.V1/gapic_metadata.json @@ -0,0 +1,114 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "csharp", + "protoPackage": "google.spanner.v1", + "libraryPackage": "Google.Cloud.Spanner.V1", + "services": { + "Spanner": { + "clients": { + "grpc": { + "libraryClient": "SpannerClient", + "rpcs": { + "BatchCreateSessions": { + "methods": [ + "BatchCreateSessions", + "BatchCreateSessionsAsync" + ] + }, + "BatchWrite": { + "methods": [ + "BatchWrite", + "BatchWriteAsync" + ] + }, + "BeginTransaction": { + "methods": [ + "BeginTransaction", + "BeginTransactionAsync" + ] + }, + "Commit": { + "methods": [ + "Commit", + "CommitAsync" + ] + }, + "CreateSession": { + "methods": [ + "CreateSession", + "CreateSessionAsync" + ] + }, + "DeleteSession": { + "methods": [ + "DeleteSession", + "DeleteSessionAsync" + ] + }, + "ExecuteBatchDml": { + "methods": [ + "ExecuteBatchDml", + "ExecuteBatchDmlAsync" + ] + }, + "ExecuteSql": { + "methods": [ + "ExecuteSql", + "ExecuteSqlAsync" + ] + }, + "ExecuteStreamingSql": { + "methods": [ + "ExecuteStreamingSql", + "ExecuteStreamingSqlAsync" + ] + }, + "GetSession": { + "methods": [ + "GetSession", + "GetSessionAsync" + ] + }, + "ListSessions": { + "methods": [ + "ListSessions", + "ListSessionsAsync" + ] + }, + "PartitionQuery": { + "methods": [ + "PartitionQuery", + "PartitionQueryAsync" + ] + }, + "PartitionRead": { + "methods": [ + "PartitionRead", + "PartitionReadAsync" + ] + }, + "Read": { + "methods": [ + "Read", + "ReadAsync" + ] + }, + "Rollback": { + "methods": [ + "Rollback", + "RollbackAsync" + ] + }, + "StreamingRead": { + "methods": [ + "StreamingRead", + "StreamingReadAsync" + ] + } + } + } + } + } + } +}