From b23d30e0474a2be2df480f1f235437b1e798e2ab Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:11:06 +0000 Subject: [PATCH 1/6] feat: Add Google.Cloud.Memorystore.V1 to the API catalog --- generator-input/apis.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/generator-input/apis.json b/generator-input/apis.json index df844ce205a8..b1b4c8168934 100644 --- a/generator-input/apis.json +++ b/generator-input/apis.json @@ -3350,6 +3350,30 @@ "transport": "grpc+rest", "includeCommonResourcesProto": true }, + { + "id": "Google.Cloud.Memorystore.V1", + "version": "1.0.0-beta00", + "type": "grpc", + "productName": "Memorystore", + "productUrl": "https://cloud.google.com/memorystore/docs/valkey", + "description": "Recommended Google client library to administer Cloud Memorystore, a fully-managed database service that provides a managed version of popular open source caching solutions.", + "tags": [ + "Memorystore", + "Valkey", + "Cache" + ], + "dependencies": { + "Google.Cloud.Location": "2.3.0", + "Google.LongRunning": "3.3.0" + }, + "generator": "micro", + "protoPath": "google/cloud/memorystore/v1", + "includeCommonResourcesProto": true, + "shortName": "memorystore", + "serviceConfigFile": "memorystore_v1.yaml", + "transport": "rest", + "restNumericEnums": true + }, { "id": "Google.Cloud.Metastore.V1", "version": "2.9.0", From bc7d7699a8e12d5a17a8141b95f1e6972482bbfb Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:12:28 +0000 Subject: [PATCH 2/6] feat: Add Google.Cloud.Memorystore.V1Beta to the API catalog --- generator-input/apis.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/generator-input/apis.json b/generator-input/apis.json index b1b4c8168934..de6a07eceabd 100644 --- a/generator-input/apis.json +++ b/generator-input/apis.json @@ -3356,7 +3356,7 @@ "type": "grpc", "productName": "Memorystore", "productUrl": "https://cloud.google.com/memorystore/docs/valkey", - "description": "Recommended Google client library to administer Cloud Memorystore, a fully-managed database service that provides a managed version of popular open source caching solutions.", + "description": "Recommended Google client library to administer Cloud Memorystore (v1), a fully-managed database service that provides a managed version of popular open source caching solutions.", "tags": [ "Memorystore", "Valkey", @@ -3374,6 +3374,26 @@ "transport": "rest", "restNumericEnums": true }, + { + "id": "Google.Cloud.Memorystore.V1Beta", + "version": "1.0.0-beta00", + "type": "grpc", + "productName": "Memorystore", + "productUrl": "https://cloud.google.com/memorystore/docs/valkey", + "description": "Recommended Google client library to administer Cloud Memorystore (v1beta), a fully-managed database service that provides a managed version of popular open source caching solutions.", + "tags": [], + "dependencies": { + "Google.Cloud.Location": "2.3.0", + "Google.LongRunning": "3.3.0" + }, + "generator": "micro", + "protoPath": "google/cloud/memorystore/v1beta", + "includeCommonResourcesProto": true, + "shortName": "memorystore", + "serviceConfigFile": "memorystore_v1beta.yaml", + "transport": "rest", + "restNumericEnums": true + }, { "id": "Google.Cloud.Metastore.V1", "version": "2.9.0", From a7d0d7d53448f8e7fc458b45dec7e36d5cdf72db Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:13:32 +0000 Subject: [PATCH 3/6] chore: Generate Google.Cloud.Memorystore.V1 --- .github/renovate.json | 2 + apis/Google.Cloud.Memorystore.V1/.OwlBot.yaml | 31 + .../.repo-metadata.json | 8 + ...ud.Memorystore.V1.GeneratedSnippets.csproj | 20 + ...toreClient.CreateInstanceAsyncSnippet.g.cs | 63 + ...eateInstanceRequestObjectAsyncSnippet.g.cs | 68 + ...nt.CreateInstanceRequestObjectSnippet.g.cs | 67 + ...eateInstanceResourceNamesAsyncSnippet.g.cs | 64 + ...nt.CreateInstanceResourceNamesSnippet.g.cs | 63 + ...morystoreClient.CreateInstanceSnippet.g.cs | 62 + ...toreClient.DeleteInstanceAsyncSnippet.g.cs | 62 + ...leteInstanceRequestObjectAsyncSnippet.g.cs | 66 + ...nt.DeleteInstanceRequestObjectSnippet.g.cs | 65 + ...leteInstanceResourceNamesAsyncSnippet.g.cs | 62 + ...nt.DeleteInstanceResourceNamesSnippet.g.cs | 61 + ...morystoreClient.DeleteInstanceSnippet.g.cs | 61 + ...t.GetCertificateAuthorityAsyncSnippet.g.cs | 44 + ...ateAuthorityRequestObjectAsyncSnippet.g.cs | 47 + ...tificateAuthorityRequestObjectSnippet.g.cs | 46 + ...ateAuthorityResourceNamesAsyncSnippet.g.cs | 44 + ...tificateAuthorityResourceNamesSnippet.g.cs | 43 + ...Client.GetCertificateAuthoritySnippet.g.cs | 43 + ...rystoreClient.GetInstanceAsyncSnippet.g.cs | 44 + ....GetInstanceRequestObjectAsyncSnippet.g.cs | 47 + ...lient.GetInstanceRequestObjectSnippet.g.cs | 46 + ....GetInstanceResourceNamesAsyncSnippet.g.cs | 44 + ...lient.GetInstanceResourceNamesSnippet.g.cs | 43 + .../MemorystoreClient.GetInstanceSnippet.g.cs | 43 + ...storeClient.ListInstancesAsyncSnippet.g.cs | 79 + ...istInstancesRequestObjectAsyncSnippet.g.cs | 85 + ...ent.ListInstancesRequestObjectSnippet.g.cs | 83 + ...istInstancesResourceNamesAsyncSnippet.g.cs | 80 + ...ent.ListInstancesResourceNamesSnippet.g.cs | 78 + ...emorystoreClient.ListInstancesSnippet.g.cs | 77 + ...toreClient.UpdateInstanceAsyncSnippet.g.cs | 63 + ...dateInstanceRequestObjectAsyncSnippet.g.cs | 67 + ...nt.UpdateInstanceRequestObjectSnippet.g.cs | 66 + ...morystoreClient.UpdateInstanceSnippet.g.cs | 62 + ..._metadata_google.cloud.memorystore.v1.json | 1713 ++++ ...oogle.Cloud.Memorystore.V1.Snippets.csproj | 20 + .../MemorystoreClientSnippets.g.cs | 997 ++ .../Google.Cloud.Memorystore.V1.sln | 37 + .../Google.Cloud.Memorystore.V1.csproj | 17 + .../Memorystore.g.cs | 8164 +++++++++++++++++ .../MemorystoreClient.g.cs | 1507 +++ .../MemorystoreGrpc.g.cs | 573 ++ .../MemorystoreResourceNames.g.cs | 1436 +++ .../PackageApiMetadata.g.cs | 74 + .../ServiceCollectionExtensions.g.cs | 64 + .../gapic_metadata.json | 54 + 50 files changed, 16755 insertions(+) create mode 100644 apis/Google.Cloud.Memorystore.V1/.OwlBot.yaml create mode 100644 apis/Google.Cloud.Memorystore.V1/.repo-metadata.json create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/Google.Cloud.Memorystore.V1.GeneratedSnippets.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1.json create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/Google.Cloud.Memorystore.V1.Snippets.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/MemorystoreClientSnippets.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.sln create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Memorystore.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreClient.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreGrpc.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreResourceNames.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/PackageApiMetadata.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/ServiceCollectionExtensions.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1/gapic_metadata.json diff --git a/.github/renovate.json b/.github/renovate.json index cb9327826f18..94728baa91af 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -156,6 +156,8 @@ "apis/Google.Cloud.MediaTranslation.V1Beta1/Google.Cloud.MediaTranslation.V1Beta1/**", "apis/Google.Cloud.Memcache.V1/Google.Cloud.Memcache.V1/**", "apis/Google.Cloud.Memcache.V1Beta2/Google.Cloud.Memcache.V1Beta2/**", + "apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/**", + "apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/**", "apis/Google.Cloud.Metastore.V1/Google.Cloud.Metastore.V1/**", "apis/Google.Cloud.Metastore.V1Alpha/Google.Cloud.Metastore.V1Alpha/**", "apis/Google.Cloud.Metastore.V1Beta/Google.Cloud.Metastore.V1Beta/**", diff --git a/apis/Google.Cloud.Memorystore.V1/.OwlBot.yaml b/apis/Google.Cloud.Memorystore.V1/.OwlBot.yaml new file mode 100644 index 000000000000..4f133012bdf8 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/.OwlBot.yaml @@ -0,0 +1,31 @@ + +# Copyright 2025 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. + +squash: true + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/memorystore/v1/.*-csharp/Google.Cloud.Memorystore.V1 + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1 + - source: /google/cloud/memorystore/v1/.*-csharp/Google.Cloud.Memorystore.V1.Snippets + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets + - source: /google/cloud/memorystore/v1/.*-csharp/Google.Cloud.Memorystore.V1.GeneratedSnippets + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets + - source: /google/cloud/memorystore/v1/.*-csharp/gapic_metadata.json + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1/gapic_metadata.json + +api-name: Google.Cloud.Memorystore.V1 diff --git a/apis/Google.Cloud.Memorystore.V1/.repo-metadata.json b/apis/Google.Cloud.Memorystore.V1/.repo-metadata.json new file mode 100644 index 000000000000..e2795e3f3524 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "distribution_name": "Google.Cloud.Memorystore.V1", + "release_level": "unreleased", + "client_documentation": "https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Memorystore.V1/latest", + "library_type": "GAPIC_AUTO", + "language": "dotnet", + "api_shortname": "memorystore" +} \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/Google.Cloud.Memorystore.V1.GeneratedSnippets.csproj b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/Google.Cloud.Memorystore.V1.GeneratedSnippets.csproj new file mode 100644 index 000000000000..9553d39d7c5a --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/Google.Cloud.Memorystore.V1.GeneratedSnippets.csproj @@ -0,0 +1,20 @@ + + + + net6.0;net462 + net6.0 + false + 1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..592abc52714f --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_async_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..12e36cefc168 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,68 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_async] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..f343b8b1a2a3 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,67 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_sync] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.CreateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..328e6fb2c844 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,64 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_async_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..5a7798bb0df2 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs new file mode 100644 index 000000000000..8b18f6763c82 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..26e045bd5a10 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..b1caa40ac237 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,66 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_async] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..ea73ea616689 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,65 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_sync] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.DeleteInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..137066dae7ee --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..6201ca51b7ad --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs new file mode 100644 index 000000000000..dbfd44021302 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs new file mode 100644 index 000000000000..2f1e07a079c5 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..ff71e311b6bb --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_async] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..f105f8fecdac --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthorityRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(request); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..968a7c0f195b --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..64af815d1548 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthorityResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs new file mode 100644 index 000000000000..bf0d865bb715 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthority() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..3bece97ef571 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_async_flattened] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..6cd8be154644 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_async] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(request); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..64f797c6dd12 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_sync] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = memorystoreClient.GetInstance(request); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..44720d761845 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..c0524322d6b0 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = memorystoreClient.GetInstance(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs new file mode 100644 index 000000000000..ddc963a617e3 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_GetInstance_sync_flattened] + using Google.Cloud.Memorystore.V1; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = memorystoreClient.GetInstance(name); + } + } + // [END memorystore_v1_generated_Memorystore_GetInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs new file mode 100644 index 000000000000..a56c9aa36f87 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_async_flattened] + using Google.Api.Gax; + using Google.Cloud.Memorystore.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..fe038ff7bb1e --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,85 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_async] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..6a5dbd3a1079 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs @@ -0,0 +1,83 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_sync] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstancesRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..6a95289c7663 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,80 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..12b7228638b2 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs @@ -0,0 +1,78 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstancesResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs new file mode 100644 index 000000000000..13658d96dd94 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_ListInstances_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Memorystore.V1; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstances() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1_generated_Memorystore_ListInstances_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..e1f833d6e207 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_UpdateInstance_async_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstanceAsync + /// + /// 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 UpdateInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_UpdateInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..bd0b005d4beb --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,67 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_UpdateInstance_async] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstanceAsync + /// + /// 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 UpdateInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_UpdateInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..610c8fb1d117 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,66 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_UpdateInstance_sync] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstance + /// + /// 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 UpdateInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.UpdateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_UpdateInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs new file mode 100644 index 000000000000..ea68fc9fca7d --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1_generated_Memorystore_UpdateInstance_sync_flattened] + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstance + /// + /// 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 UpdateInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = memorystoreClient.UpdateInstance(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1_generated_Memorystore_UpdateInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1.json b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1.json new file mode 100644 index 000000000000..4b4e8eac08d2 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1.json @@ -0,0 +1,1713 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.Memorystore.V1", + "language": "C_SHARP", + "apis": [ + { + "id": "google.cloud.memorystore.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_sync", + "title": "ListInstancesRequestObject", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.ListInstancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 81, + "type": "FULL" + }, + { + "start": 37, + "end": 79, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_async", + "title": "ListInstancesRequestObjectAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.ListInstancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 83, + "type": "FULL" + }, + { + "start": 39, + "end": 81, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_sync_flattened", + "title": "ListInstances", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_async_flattened", + "title": "ListInstancesAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_sync_flattened_resourceNames", + "title": "ListInstancesResourceNames", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 76, + "type": "FULL" + }, + { + "start": 37, + "end": 74, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_ListInstances_async_flattened_resourceNames", + "title": "ListInstancesResourceNamesAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 78, + "type": "FULL" + }, + { + "start": 39, + "end": 76, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_sync", + "title": "GetInstanceRequestObject", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.GetInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_async", + "title": "GetInstanceRequestObjectAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.GetInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_sync_flattened", + "title": "GetInstance", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_async_flattened", + "title": "GetInstanceAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_sync_flattened_resourceNames", + "title": "GetInstanceResourceNames", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetInstance_async_flattened_resourceNames", + "title": "GetInstanceResourceNamesAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_sync", + "title": "CreateInstanceRequestObject", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.CreateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 65, + "type": "FULL" + }, + { + "start": 36, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_async", + "title": "CreateInstanceRequestObjectAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.CreateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 66, + "type": "FULL" + }, + { + "start": 37, + "end": 64, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened", + "title": "CreateInstance", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 35, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_async_flattened", + "title": "CreateInstanceAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 36, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_sync_flattened_resourceNames", + "title": "CreateInstanceResourceNames", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 36, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_CreateInstance_async_flattened_resourceNames", + "title": "CreateInstanceResourceNamesAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 62, + "type": "FULL" + }, + { + "start": 37, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_UpdateInstance_sync", + "title": "UpdateInstanceRequestObject", + "description": "Snippet for UpdateInstance", + "file": "MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.UpdateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.UpdateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_UpdateInstance_async", + "title": "UpdateInstanceRequestObjectAsync", + "description": "Snippet for UpdateInstanceAsync", + "file": "MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.UpdateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.UpdateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 65, + "type": "FULL" + }, + { + "start": 37, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_UpdateInstance_sync_flattened", + "title": "UpdateInstance", + "description": "Snippet for UpdateInstance", + "file": "MemorystoreClient.UpdateInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.UpdateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 36, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_UpdateInstance_async_flattened", + "title": "UpdateInstanceAsync", + "description": "Snippet for UpdateInstanceAsync", + "file": "MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.UpdateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.Instance", + "name": "instance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 37, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_sync", + "title": "DeleteInstanceRequestObject", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.DeleteInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 63, + "type": "FULL" + }, + { + "start": 36, + "end": 61, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_async", + "title": "DeleteInstanceRequestObjectAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.DeleteInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 37, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened", + "title": "DeleteInstance", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened", + "title": "DeleteInstanceAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 37, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames", + "title": "DeleteInstanceResourceNames", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_DeleteInstance_async_flattened_resourceNames", + "title": "DeleteInstanceResourceNamesAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 37, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync", + "title": "GetCertificateAuthorityRequestObject", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_async", + "title": "GetCertificateAuthorityRequestObjectAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened", + "title": "GetCertificateAuthority", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthoritySnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened", + "title": "GetCertificateAuthorityAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames", + "title": "GetCertificateAuthorityResourceNames", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames", + "title": "GetCertificateAuthorityResourceNamesAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + } + ] +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/Google.Cloud.Memorystore.V1.Snippets.csproj b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/Google.Cloud.Memorystore.V1.Snippets.csproj new file mode 100644 index 000000000000..9553d39d7c5a --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/Google.Cloud.Memorystore.V1.Snippets.csproj @@ -0,0 +1,20 @@ + + + + net6.0;net462 + net6.0 + false + 1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/MemorystoreClientSnippets.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/MemorystoreClientSnippets.g.cs new file mode 100644 index 000000000000..1d696b83806d --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.Snippets/MemorystoreClientSnippets.g.cs @@ -0,0 +1,997 @@ +// Copyright 2025 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 +{ + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Linq; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + public void ListInstancesRequestObject() + { + // Snippet: ListInstances(ListInstancesRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesRequestObjectAsync() + { + // Snippet: ListInstancesAsync(ListInstancesRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstances + public void ListInstances() + { + // Snippet: ListInstances(string, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesAsync() + { + // Snippet: ListInstancesAsync(string, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstances + public void ListInstancesResourceNames() + { + // Snippet: ListInstances(LocationName, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesResourceNamesAsync() + { + // Snippet: ListInstancesAsync(LocationName, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 GetInstance + public void GetInstanceRequestObject() + { + // Snippet: GetInstance(GetInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = memorystoreClient.GetInstance(request); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceRequestObjectAsync() + { + // Snippet: GetInstanceAsync(GetInstanceRequest, CallSettings) + // Additional: GetInstanceAsync(GetInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(request); + // End snippet + } + + /// Snippet for GetInstance + public void GetInstance() + { + // Snippet: GetInstance(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = memorystoreClient.GetInstance(name); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceAsync() + { + // Snippet: GetInstanceAsync(string, CallSettings) + // Additional: GetInstanceAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + // End snippet + } + + /// Snippet for GetInstance + public void GetInstanceResourceNames() + { + // Snippet: GetInstance(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = memorystoreClient.GetInstance(name); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceResourceNamesAsync() + { + // Snippet: GetInstanceAsync(InstanceName, CallSettings) + // Additional: GetInstanceAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstanceRequestObject() + { + // Snippet: CreateInstance(CreateInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.CreateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceRequestObjectAsync() + { + // Snippet: CreateInstanceAsync(CreateInstanceRequest, CallSettings) + // Additional: CreateInstanceAsync(CreateInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstance() + { + // Snippet: CreateInstance(string, Instance, string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceAsync() + { + // Snippet: CreateInstanceAsync(string, Instance, string, CallSettings) + // Additional: CreateInstanceAsync(string, Instance, string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstanceResourceNames() + { + // Snippet: CreateInstance(LocationName, Instance, string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceResourceNamesAsync() + { + // Snippet: CreateInstanceAsync(LocationName, Instance, string, CallSettings) + // Additional: CreateInstanceAsync(LocationName, Instance, string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstance + public void UpdateInstanceRequestObject() + { + // Snippet: UpdateInstance(UpdateInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.UpdateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstanceAsync + public async Task UpdateInstanceRequestObjectAsync() + { + // Snippet: UpdateInstanceAsync(UpdateInstanceRequest, CallSettings) + // Additional: UpdateInstanceAsync(UpdateInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstance + public void UpdateInstance() + { + // Snippet: UpdateInstance(Instance, FieldMask, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = memorystoreClient.UpdateInstance(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstanceAsync + public async Task UpdateInstanceAsync() + { + // Snippet: UpdateInstanceAsync(Instance, FieldMask, CallSettings) + // Additional: UpdateInstanceAsync(Instance, FieldMask, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstanceRequestObject() + { + // Snippet: DeleteInstance(DeleteInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.DeleteInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceRequestObjectAsync() + { + // Snippet: DeleteInstanceAsync(DeleteInstanceRequest, CallSettings) + // Additional: DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstance() + { + // Snippet: DeleteInstance(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceAsync() + { + // Snippet: DeleteInstanceAsync(string, CallSettings) + // Additional: DeleteInstanceAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstanceResourceNames() + { + // Snippet: DeleteInstance(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceResourceNamesAsync() + { + // Snippet: DeleteInstanceAsync(InstanceName, CallSettings) + // Additional: DeleteInstanceAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthorityRequestObject() + { + // Snippet: GetCertificateAuthority(GetCertificateAuthorityRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(request); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityRequestObjectAsync() + { + // Snippet: GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CallSettings) + // Additional: GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request); + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthority() + { + // Snippet: GetCertificateAuthority(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityAsync() + { + // Snippet: GetCertificateAuthorityAsync(string, CallSettings) + // Additional: GetCertificateAuthorityAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthorityResourceNames() + { + // Snippet: GetCertificateAuthority(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityResourceNamesAsync() + { + // Snippet: GetCertificateAuthorityAsync(InstanceName, CallSettings) + // Additional: GetCertificateAuthorityAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + // End snippet + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.sln b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.sln new file mode 100644 index 000000000000..05eaa9049292 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32516.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1", "Google.Cloud.Memorystore.V1\Google.Cloud.Memorystore.V1.csproj", "{1C8BEC28-6685-3494-E35B-B539B0230F33}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1.Snippets", "Google.Cloud.Memorystore.V1.Snippets\Google.Cloud.Memorystore.V1.Snippets.csproj", "{E538723B-FA58-AB44-324A-732CB3549621}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1.GeneratedSnippets", "Google.Cloud.Memorystore.V1.GeneratedSnippets\Google.Cloud.Memorystore.V1.GeneratedSnippets.csproj", "{BD1C0D2F-7F2A-3765-16C9-09D31B7531CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ClientTesting", "..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj", "{29974B0C-A7B0-8CA8-AE32-99F622C89044}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1C8BEC28-6685-3494-E35B-B539B0230F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C8BEC28-6685-3494-E35B-B539B0230F33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C8BEC28-6685-3494-E35B-B539B0230F33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C8BEC28-6685-3494-E35B-B539B0230F33}.Release|Any CPU.Build.0 = Release|Any CPU + {E538723B-FA58-AB44-324A-732CB3549621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E538723B-FA58-AB44-324A-732CB3549621}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E538723B-FA58-AB44-324A-732CB3549621}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E538723B-FA58-AB44-324A-732CB3549621}.Release|Any CPU.Build.0 = Release|Any CPU + {BD1C0D2F-7F2A-3765-16C9-09D31B7531CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD1C0D2F-7F2A-3765-16C9-09D31B7531CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD1C0D2F-7F2A-3765-16C9-09D31B7531CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD1C0D2F-7F2A-3765-16C9-09D31B7531CD}.Release|Any CPU.Build.0 = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.csproj b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.csproj new file mode 100644 index 000000000000..71597949b3e0 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1.csproj @@ -0,0 +1,17 @@ + + + + 1.0.0-beta00 + netstandard2.0;net462 + true + Recommended Google client library to administer Cloud Memorystore (v1), a fully-managed database service that provides a managed version of popular open source caching solutions. + Memorystore;Valkey;Cache;Google;Cloud + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Memorystore.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Memorystore.g.cs new file mode 100644 index 000000000000..203871af7fc4 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/Memorystore.g.cs @@ -0,0 +1,8164 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/memorystore/v1/memorystore.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.Memorystore.V1 { + + /// Holder for reflection information generated from google/cloud/memorystore/v1/memorystore.proto + public static partial class MemorystoreReflection { + + #region Descriptor + /// File descriptor for google/cloud/memorystore/v1/memorystore.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MemorystoreReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci1nb29nbGUvY2xvdWQvbWVtb3J5c3RvcmUvdjEvbWVtb3J5c3RvcmUucHJv", + "dG8SG2dvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MRocZ29vZ2xlL2FwaS9h", + "bm5vdGF0aW9ucy5wcm90bxoXZ29vZ2xlL2FwaS9jbGllbnQucHJvdG8aH2dv", + "b2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aG2dvb2dsZS9hcGkvZmll", + "bGRfaW5mby5wcm90bxoZZ29vZ2xlL2FwaS9yZXNvdXJjZS5wcm90bxojZ29v", + "Z2xlL2xvbmdydW5uaW5nL29wZXJhdGlvbnMucHJvdG8aG2dvb2dsZS9wcm90", + "b2J1Zi9lbXB0eS5wcm90bxogZ29vZ2xlL3Byb3RvYnVmL2ZpZWxkX21hc2su", + "cHJvdG8aH2dvb2dsZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8inhUKCElu", + "c3RhbmNlEhEKBG5hbWUYASABKAlCA+BBCBI0CgtjcmVhdGVfdGltZRgCIAEo", + "CzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVf", + "dGltZRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJG", + "CgZsYWJlbHMYBCADKAsyMS5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEu", + "SW5zdGFuY2UuTGFiZWxzRW50cnlCA+BBARI/CgVzdGF0ZRgFIAEoDjIrLmdv", + "b2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MS5JbnN0YW5jZS5TdGF0ZUID4EED", + "EkgKCnN0YXRlX2luZm8YBiABKAsyLy5nb29nbGUuY2xvdWQubWVtb3J5c3Rv", + "cmUudjEuSW5zdGFuY2UuU3RhdGVJbmZvQgPgQQMSGAoDdWlkGAcgASgJQgvg", + "QQPijM/XCAIIARIfCg1yZXBsaWNhX2NvdW50GAggASgFQgPgQQFIAIgBARJb", + "ChJhdXRob3JpemF0aW9uX21vZGUYCSABKA4yNy5nb29nbGUuY2xvdWQubWVt", + "b3J5c3RvcmUudjEuSW5zdGFuY2UuQXV0aG9yaXphdGlvbk1vZGVCBuBBAeBB", + "BRJkChd0cmFuc2l0X2VuY3J5cHRpb25fbW9kZRgKIAEoDjI7Lmdvb2dsZS5j", + "bG91ZC5tZW1vcnlzdG9yZS52MS5JbnN0YW5jZS5UcmFuc2l0RW5jcnlwdGlv", + "bk1vZGVCBuBBAeBBBRIYCgtzaGFyZF9jb3VudBgLIAEoBUID4EEBElAKE2Rp", + "c2NvdmVyeV9lbmRwb2ludHMYDCADKAsyLi5nb29nbGUuY2xvdWQubWVtb3J5", + "c3RvcmUudjEuRGlzY292ZXJ5RW5kcG9pbnRCA+BBAxJJCglub2RlX3R5cGUY", + "DSABKA4yLi5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuSW5zdGFuY2Uu", + "Tm9kZVR5cGVCBuBBAeBBBRJPChJwZXJzaXN0ZW5jZV9jb25maWcYDiABKAsy", + "Li5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuUGVyc2lzdGVuY2VDb25m", + "aWdCA+BBARIeCg5lbmdpbmVfdmVyc2lvbhgPIAEoCUIG4EEB4EEFElUKDmVu", + "Z2luZV9jb25maWdzGBAgAygLMjguZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3Jl", + "LnYxLkluc3RhbmNlLkVuZ2luZUNvbmZpZ3NFbnRyeUID4EEBEkEKC25vZGVf", + "Y29uZmlnGBEgASgLMicuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLk5v", + "ZGVDb25maWdCA+BBAxJdChh6b25lX2Rpc3RyaWJ1dGlvbl9jb25maWcYEiAB", + "KAsyMy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuWm9uZURpc3RyaWJ1", + "dGlvbkNvbmZpZ0IG4EEB4EEFEi0KG2RlbGV0aW9uX3Byb3RlY3Rpb25fZW5h", + "YmxlZBgTIAEoCEID4EEBSAGIAQESVAoUcHNjX2F1dG9fY29ubmVjdGlvbnMY", + "FCADKAsyLi5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuUHNjQXV0b0Nv", + "bm5lY3Rpb25CBuBBAuBBBRJOCgllbmRwb2ludHMYGSADKAsyNi5nb29nbGUu", + "Y2xvdWQubWVtb3J5c3RvcmUudjEuSW5zdGFuY2UuSW5zdGFuY2VFbmRwb2lu", + "dEID4EEBEj0KBG1vZGUYGiABKA4yKi5nb29nbGUuY2xvdWQubWVtb3J5c3Rv", + "cmUudjEuSW5zdGFuY2UuTW9kZUID4EEBGvgBCglTdGF0ZUluZm8SVgoLdXBk", + "YXRlX2luZm8YASABKAsyOi5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEu", + "SW5zdGFuY2UuU3RhdGVJbmZvLlVwZGF0ZUluZm9CA+BBA0gAGooBCgpVcGRh", + "dGVJbmZvEiQKEnRhcmdldF9zaGFyZF9jb3VudBgBIAEoBUID4EEDSACIAQES", + "JgoUdGFyZ2V0X3JlcGxpY2FfY291bnQYAiABKAVCA+BBA0gBiAEBQhUKE190", + "YXJnZXRfc2hhcmRfY291bnRCFwoVX3RhcmdldF9yZXBsaWNhX2NvdW50QgYK", + "BGluZm8aZAoQSW5zdGFuY2VFbmRwb2ludBJQCgtjb25uZWN0aW9ucxgBIAMo", + "CzI2Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MS5JbnN0YW5jZS5Db25u", + "ZWN0aW9uRGV0YWlsQgPgQQEatQEKEENvbm5lY3Rpb25EZXRhaWwSTQoTcHNj", + "X2F1dG9fY29ubmVjdGlvbhgBIAEoCzIuLmdvb2dsZS5jbG91ZC5tZW1vcnlz", + "dG9yZS52MS5Qc2NBdXRvQ29ubmVjdGlvbkgAEkQKDnBzY19jb25uZWN0aW9u", + "GAIgASgLMiouZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLlBzY0Nvbm5l", + "Y3Rpb25IAEIMCgpjb25uZWN0aW9uGi0KC0xhYmVsc0VudHJ5EgsKA2tleRgB", + "IAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaNAoSRW5naW5lQ29uZmlnc0VudHJ5", + "EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiVAoFU3RhdGUSFQoR", + "U1RBVEVfVU5TUEVDSUZJRUQQABIMCghDUkVBVElORxABEgoKBkFDVElWRRAC", + "EgwKCFVQREFUSU5HEAMSDAoIREVMRVRJTkcQBCJYChFBdXRob3JpemF0aW9u", + "TW9kZRIiCh5BVVRIT1JJWkFUSU9OX01PREVfVU5TUEVDSUZJRUQQABIRCg1B", + "VVRIX0RJU0FCTEVEEAESDAoISUFNX0FVVEgQAiJ8ChVUcmFuc2l0RW5jcnlw", + "dGlvbk1vZGUSJwojVFJBTlNJVF9FTkNSWVBUSU9OX01PREVfVU5TUEVDSUZJ", + "RUQQABIfChtUUkFOU0lUX0VOQ1JZUFRJT05fRElTQUJMRUQQARIZChVTRVJW", + "RVJfQVVUSEVOVElDQVRJT04QAiJ3CghOb2RlVHlwZRIZChVOT0RFX1RZUEVf", + "VU5TUEVDSUZJRUQQABIUChBTSEFSRURfQ09SRV9OQU5PEAESEgoOSElHSE1F", + "TV9NRURJVU0QAhISCg5ISUdITUVNX1hMQVJHRRADEhIKDlNUQU5EQVJEX1NN", + "QUxMEAQiOQoETW9kZRIUChBNT0RFX1VOU1BFQ0lGSUVEEAASDgoKU1RBTkRB", + "TE9ORRABEgsKB0NMVVNURVIQAjp76kF4CiNtZW1vcnlzdG9yZS5nb29nbGVh", + "cGlzLmNvbS9JbnN0YW5jZRI8cHJvamVjdHMve3Byb2plY3R9L2xvY2F0aW9u", + "cy97bG9jYXRpb259L2luc3RhbmNlcy97aW5zdGFuY2V9KglpbnN0YW5jZXMy", + "CGluc3RhbmNlQhAKDl9yZXBsaWNhX2NvdW50Qh4KHF9kZWxldGlvbl9wcm90", + "ZWN0aW9uX2VuYWJsZWQi/gMKEVBzY0F1dG9Db25uZWN0aW9uEhYKBHBvcnQY", + "CSABKAVCBuBBA+BBAUgAEh4KEXBzY19jb25uZWN0aW9uX2lkGAEgASgJQgPg", + "QQMSHwoKaXBfYWRkcmVzcxgCIAEoCUIL4EED4ozP1wgCCAISRgoPZm9yd2Fy", + "ZGluZ19ydWxlGAMgASgJQi3gQQP6QScKJWNvbXB1dGUuZ29vZ2xlYXBpcy5j", + "b20vRm9yd2FyZGluZ1J1bGUSFwoKcHJvamVjdF9pZBgEIAEoCUID4EECEjcK", + "B25ldHdvcmsYBSABKAlCJuBBAvpBIAoeY29tcHV0ZS5nb29nbGVhcGlzLmNv", + "bS9OZXR3b3JrEkwKEnNlcnZpY2VfYXR0YWNobWVudBgGIAEoCUIw4EED+kEq", + "Cihjb21wdXRlLmdvb2dsZWFwaXMuY29tL1NlcnZpY2VBdHRhY2htZW50ElQK", + "FXBzY19jb25uZWN0aW9uX3N0YXR1cxgHIAEoDjIwLmdvb2dsZS5jbG91ZC5t", + "ZW1vcnlzdG9yZS52MS5Qc2NDb25uZWN0aW9uU3RhdHVzQgPgQQMSSQoPY29u", + "bmVjdGlvbl90eXBlGAggASgOMisuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3Jl", + "LnYxLkNvbm5lY3Rpb25UeXBlQgPgQQNCBwoFcG9ydHMi2QMKDVBzY0Nvbm5l", + "Y3Rpb24SHgoRcHNjX2Nvbm5lY3Rpb25faWQYASABKAlCA+BBAxIfCgppcF9h", + "ZGRyZXNzGAIgASgJQgvgQQLijM/XCAIIAhJGCg9mb3J3YXJkaW5nX3J1bGUY", + "AyABKAlCLeBBAvpBJwolY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9Gb3J3YXJk", + "aW5nUnVsZRIXCgpwcm9qZWN0X2lkGAQgASgJQgPgQQMSNwoHbmV0d29yaxgF", + "IAEoCUIm4EEC+kEgCh5jb21wdXRlLmdvb2dsZWFwaXMuY29tL05ldHdvcmsS", + "TAoSc2VydmljZV9hdHRhY2htZW50GAYgASgJQjDgQQL6QSoKKGNvbXB1dGUu", + "Z29vZ2xlYXBpcy5jb20vU2VydmljZUF0dGFjaG1lbnQSVAoVcHNjX2Nvbm5l", + "Y3Rpb25fc3RhdHVzGAcgASgOMjAuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3Jl", + "LnYxLlBzY0Nvbm5lY3Rpb25TdGF0dXNCA+BBAxJJCg9jb25uZWN0aW9uX3R5", + "cGUYCCABKA4yKy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuQ29ubmVj", + "dGlvblR5cGVCA+BBAyJ1ChFEaXNjb3ZlcnlFbmRwb2ludBIUCgdhZGRyZXNz", + "GAEgASgJQgPgQQMSEQoEcG9ydBgCIAEoBUID4EEDEjcKB25ldHdvcmsYBCAB", + "KAlCJuBBA/pBIAoeY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9OZXR3b3JrItcG", + "ChFQZXJzaXN0ZW5jZUNvbmZpZxJRCgRtb2RlGAEgASgOMj4uZ29vZ2xlLmNs", + "b3VkLm1lbW9yeXN0b3JlLnYxLlBlcnNpc3RlbmNlQ29uZmlnLlBlcnNpc3Rl", + "bmNlTW9kZUID4EEBElEKCnJkYl9jb25maWcYAiABKAsyOC5nb29nbGUuY2xv", + "dWQubWVtb3J5c3RvcmUudjEuUGVyc2lzdGVuY2VDb25maWcuUkRCQ29uZmln", + "QgPgQQESUQoKYW9mX2NvbmZpZxgDIAEoCzI4Lmdvb2dsZS5jbG91ZC5tZW1v", + "cnlzdG9yZS52MS5QZXJzaXN0ZW5jZUNvbmZpZy5BT0ZDb25maWdCA+BBARqx", + "AgoJUkRCQ29uZmlnEmkKE3JkYl9zbmFwc2hvdF9wZXJpb2QYASABKA4yRy5n", + "b29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuUGVyc2lzdGVuY2VDb25maWcu", + "UkRCQ29uZmlnLlNuYXBzaG90UGVyaW9kQgPgQQESQAoXcmRiX3NuYXBzaG90", + "X3N0YXJ0X3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1w", + "QgPgQQEidwoOU25hcHNob3RQZXJpb2QSHwobU05BUFNIT1RfUEVSSU9EX1VO", + "U1BFQ0lGSUVEEAASDAoIT05FX0hPVVIQARINCglTSVhfSE9VUlMQAhIQCgxU", + "V0VMVkVfSE9VUlMQAxIVChFUV0VOVFlfRk9VUl9IT1VSUxAEGr8BCglBT0ZD", + "b25maWcSXwoMYXBwZW5kX2ZzeW5jGAEgASgOMkQuZ29vZ2xlLmNsb3VkLm1l", + "bW9yeXN0b3JlLnYxLlBlcnNpc3RlbmNlQ29uZmlnLkFPRkNvbmZpZy5BcHBl", + "bmRGc3luY0ID4EEBIlEKC0FwcGVuZEZzeW5jEhwKGEFQUEVORF9GU1lOQ19V", + "TlNQRUNJRklFRBAAEgkKBU5FVkVSEAESDQoJRVZFUllfU0VDEAISCgoGQUxX", + "QVlTEAMiUwoPUGVyc2lzdGVuY2VNb2RlEiAKHFBFUlNJU1RFTkNFX01PREVf", + "VU5TUEVDSUZJRUQQABIMCghESVNBQkxFRBABEgcKA1JEQhACEgcKA0FPRhAD", + "IiIKCk5vZGVDb25maWcSFAoHc2l6ZV9nYhgBIAEoAUID4EEDIukBChZab25l", + "RGlzdHJpYnV0aW9uQ29uZmlnEhEKBHpvbmUYAiABKAlCA+BBARJbCgRtb2Rl", + "GAEgASgOMkguZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLlpvbmVEaXN0", + "cmlidXRpb25Db25maWcuWm9uZURpc3RyaWJ1dGlvbk1vZGVCA+BBASJfChRa", + "b25lRGlzdHJpYnV0aW9uTW9kZRImCiJaT05FX0RJU1RSSUJVVElPTl9NT0RF", + "X1VOU1BFQ0lGSUVEEAASDgoKTVVMVElfWk9ORRABEg8KC1NJTkdMRV9aT05F", + "EAIisAEKFExpc3RJbnN0YW5jZXNSZXF1ZXN0EjsKBnBhcmVudBgBIAEoCUIr", + "4EEC+kElEiNtZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5jZRIW", + "CglwYWdlX3NpemUYAiABKAVCA+BBARIXCgpwYWdlX3Rva2VuGAMgASgJQgPg", + "QQESEwoGZmlsdGVyGAQgASgJQgPgQQESFQoIb3JkZXJfYnkYBSABKAlCA+BB", + "ASJ/ChVMaXN0SW5zdGFuY2VzUmVzcG9uc2USOAoJaW5zdGFuY2VzGAEgAygL", + "MiUuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLkluc3RhbmNlEhcKD25l", + "eHRfcGFnZV90b2tlbhgCIAEoCRITCgt1bnJlYWNoYWJsZRgDIAMoCSJPChJH", + "ZXRJbnN0YW5jZVJlcXVlc3QSOQoEbmFtZRgBIAEoCUIr4EEC+kElCiNtZW1v", + "cnlzdG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5jZSLNAQoVQ3JlYXRlSW5z", + "dGFuY2VSZXF1ZXN0EjsKBnBhcmVudBgBIAEoCUIr4EEC+kElEiNtZW1vcnlz", + "dG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5jZRIYCgtpbnN0YW5jZV9pZBgC", + "IAEoCUID4EECEjwKCGluc3RhbmNlGAMgASgLMiUuZ29vZ2xlLmNsb3VkLm1l", + "bW9yeXN0b3JlLnYxLkluc3RhbmNlQgPgQQISHwoKcmVxdWVzdF9pZBgEIAEo", + "CUIL4EEB4ozP1wgCCAEirAEKFVVwZGF0ZUluc3RhbmNlUmVxdWVzdBI0Cgt1", + "cGRhdGVfbWFzaxgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tC", + "A+BBARI8CghpbnN0YW5jZRgCIAEoCzIlLmdvb2dsZS5jbG91ZC5tZW1vcnlz", + "dG9yZS52MS5JbnN0YW5jZUID4EECEh8KCnJlcXVlc3RfaWQYAyABKAlCC+BB", + "AeKMz9cIAggBInMKFURlbGV0ZUluc3RhbmNlUmVxdWVzdBI5CgRuYW1lGAEg", + "ASgJQivgQQL6QSUKI21lbW9yeXN0b3JlLmdvb2dsZWFwaXMuY29tL0luc3Rh", + "bmNlEh8KCnJlcXVlc3RfaWQYAiABKAlCC+BBAeKMz9cIAggBIlsKHkdldENl", + "cnRpZmljYXRlQXV0aG9yaXR5UmVxdWVzdBI5CgRuYW1lGAEgASgJQivgQQL6", + "QSUKI21lbW9yeXN0b3JlLmdvb2dsZWFwaXMuY29tL0luc3RhbmNlIokEChRD", + "ZXJ0aWZpY2F0ZUF1dGhvcml0eRJqChFtYW5hZ2VkX3NlcnZlcl9jYRgCIAEo", + "CzJNLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MS5DZXJ0aWZpY2F0ZUF1", + "dGhvcml0eS5NYW5hZ2VkQ2VydGlmaWNhdGVBdXRob3JpdHlIABIRCgRuYW1l", + "GAEgASgJQgPgQQgaqwEKG01hbmFnZWRDZXJ0aWZpY2F0ZUF1dGhvcml0eRJp", + "CghjYV9jZXJ0cxgBIAMoCzJXLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52", + "MS5DZXJ0aWZpY2F0ZUF1dGhvcml0eS5NYW5hZ2VkQ2VydGlmaWNhdGVBdXRo", + "b3JpdHkuQ2VydENoYWluGiEKCUNlcnRDaGFpbhIUCgxjZXJ0aWZpY2F0ZXMY", + "ASADKAk6tgHqQbIBCi9tZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNvbS9DZXJ0", + "aWZpY2F0ZUF1dGhvcml0eRJRcHJvamVjdHMve3Byb2plY3R9L2xvY2F0aW9u", + "cy97bG9jYXRpb259L2luc3RhbmNlcy97aW5zdGFuY2V9L2NlcnRpZmljYXRl", + "QXV0aG9yaXR5KhZjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzMhRjZXJ0aWZpY2F0", + "ZUF1dGhvcml0eUILCglzZXJ2ZXJfY2EigAIKEU9wZXJhdGlvbk1ldGFkYXRh", + "EjQKC2NyZWF0ZV90aW1lGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVz", + "dGFtcEID4EEDEjEKCGVuZF90aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVm", + "LlRpbWVzdGFtcEID4EEDEhMKBnRhcmdldBgDIAEoCUID4EEDEhEKBHZlcmIY", + "BCABKAlCA+BBAxIbCg5zdGF0dXNfbWVzc2FnZRgFIAEoCUID4EEDEiMKFnJl", + "cXVlc3RlZF9jYW5jZWxsYXRpb24YBiABKAhCA+BBAxIYCgthcGlfdmVyc2lv", + "bhgHIAEoCUID4EEDKlcKE1BzY0Nvbm5lY3Rpb25TdGF0dXMSJQohUFNDX0NP", + "Tk5FQ1RJT05fU1RBVFVTX1VOU1BFQ0lGSUVEEAASCgoGQUNUSVZFEAESDQoJ", + "Tk9UX0ZPVU5EEAIqiQEKDkNvbm5lY3Rpb25UeXBlEh8KG0NPTk5FQ1RJT05f", + "VFlQRV9VTlNQRUNJRklFRBAAEh0KGUNPTk5FQ1RJT05fVFlQRV9ESVNDT1ZF", + "UlkQARIbChdDT05ORUNUSU9OX1RZUEVfUFJJTUFSWRACEhoKFkNPTk5FQ1RJ", + "T05fVFlQRV9SRUFERVIQAzK4CgoLTWVtb3J5c3RvcmUStgEKDUxpc3RJbnN0", + "YW5jZXMSMS5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuTGlzdEluc3Rh", + "bmNlc1JlcXVlc3QaMi5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuTGlz", + "dEluc3RhbmNlc1Jlc3BvbnNlIj7aQQZwYXJlbnSC0+STAi8SLS92MS97cGFy", + "ZW50PXByb2plY3RzLyovbG9jYXRpb25zLyp9L2luc3RhbmNlcxKjAQoLR2V0", + "SW5zdGFuY2USLy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjEuR2V0SW5z", + "dGFuY2VSZXF1ZXN0GiUuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLklu", + "c3RhbmNlIjzaQQRuYW1lgtPkkwIvEi0vdjEve25hbWU9cHJvamVjdHMvKi9s", + "b2NhdGlvbnMvKi9pbnN0YW5jZXMvKn0S4gEKDkNyZWF0ZUluc3RhbmNlEjIu", + "Z29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLkNyZWF0ZUluc3RhbmNlUmVx", + "dWVzdBodLmdvb2dsZS5sb25ncnVubmluZy5PcGVyYXRpb24ifcpBHQoISW5z", + "dGFuY2USEU9wZXJhdGlvbk1ldGFkYXRh2kEbcGFyZW50LGluc3RhbmNlLGlu", + "c3RhbmNlX2lkgtPkkwI5Ii0vdjEve3BhcmVudD1wcm9qZWN0cy8qL2xvY2F0", + "aW9ucy8qfS9pbnN0YW5jZXM6CGluc3RhbmNlEuQBCg5VcGRhdGVJbnN0YW5j", + "ZRIyLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MS5VcGRhdGVJbnN0YW5j", + "ZVJlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9uIn/KQR0K", + "CEluc3RhbmNlEhFPcGVyYXRpb25NZXRhZGF0YdpBFGluc3RhbmNlLHVwZGF0", + "ZV9tYXNrgtPkkwJCMjYvdjEve2luc3RhbmNlLm5hbWU9cHJvamVjdHMvKi9s", + "b2NhdGlvbnMvKi9pbnN0YW5jZXMvKn06CGluc3RhbmNlEs4BCg5EZWxldGVJ", + "bnN0YW5jZRIyLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MS5EZWxldGVJ", + "bnN0YW5jZVJlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9u", + "ImnKQSoKFWdvb2dsZS5wcm90b2J1Zi5FbXB0eRIRT3BlcmF0aW9uTWV0YWRh", + "dGHaQQRuYW1lgtPkkwIvKi0vdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlv", + "bnMvKi9pbnN0YW5jZXMvKn0S3AEKF0dldENlcnRpZmljYXRlQXV0aG9yaXR5", + "EjsuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxLkdldENlcnRpZmljYXRl", + "QXV0aG9yaXR5UmVxdWVzdBoxLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52", + "MS5DZXJ0aWZpY2F0ZUF1dGhvcml0eSJR2kEEbmFtZYLT5JMCRBJCL3YxL3tu", + "YW1lPXByb2plY3RzLyovbG9jYXRpb25zLyovaW5zdGFuY2VzLyp9L2NlcnRp", + "ZmljYXRlQXV0aG9yaXR5Gk7KQRptZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNv", + "bdJBLmh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvY2xvdWQtcGxh", + "dGZvcm1CjAQKH2NvbS5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFCC1Yx", + "bWFpblByb3RvUAFaQWNsb3VkLmdvb2dsZS5jb20vZ28vbWVtb3J5c3RvcmUv", + "YXBpdjEvbWVtb3J5c3RvcmVwYjttZW1vcnlzdG9yZXBiqgIbR29vZ2xlLkNs", + "b3VkLk1lbW9yeXN0b3JlLlYxygIbR29vZ2xlXENsb3VkXE1lbW9yeXN0b3Jl", + "XFYx6gIeR29vZ2xlOjpDbG91ZDo6TWVtb3J5c3RvcmU6OlYx6kFuCiVjb21w", + "dXRlLmdvb2dsZWFwaXMuY29tL0ZvcndhcmRpbmdSdWxlEkVwcm9qZWN0cy97", + "cHJvamVjdH0vcmVnaW9ucy97cmVnaW9ufS9mb3J3YXJkaW5nUnVsZXMve2Zv", + "cndhcmRpbmdfcnVsZX3qQU4KHmNvbXB1dGUuZ29vZ2xlYXBpcy5jb20vTmV0", + "d29yaxIscHJvamVjdHMve3Byb2plY3R9L2dsb2JhbC9uZXR3b3Jrcy97bmV0", + "d29ya33qQXcKKGNvbXB1dGUuZ29vZ2xlYXBpcy5jb20vU2VydmljZUF0dGFj", + "aG1lbnQSS3Byb2plY3RzL3twcm9qZWN0fS9yZWdpb25zL3tyZWdpb259L3Nl", + "cnZpY2VBdHRhY2htZW50cy97c2VydmljZV9hdHRhY2htZW50fWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.FieldInfoReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Memorystore.V1.PscConnectionStatus), typeof(global::Google.Cloud.Memorystore.V1.ConnectionType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.Instance), global::Google.Cloud.Memorystore.V1.Instance.Parser, new[]{ "Name", "CreateTime", "UpdateTime", "Labels", "State", "StateInfo", "Uid", "ReplicaCount", "AuthorizationMode", "TransitEncryptionMode", "ShardCount", "DiscoveryEndpoints", "NodeType", "PersistenceConfig", "EngineVersion", "EngineConfigs", "NodeConfig", "ZoneDistributionConfig", "DeletionProtectionEnabled", "PscAutoConnections", "Endpoints", "Mode" }, new[]{ "ReplicaCount", "DeletionProtectionEnabled" }, new[]{ typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.State), typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode), typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode), typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType), typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.Mode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo), global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Parser, new[]{ "UpdateInfo" }, new[]{ "Info" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo), global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo.Parser, new[]{ "TargetShardCount", "TargetReplicaCount" }, new[]{ "TargetShardCount", "TargetReplicaCount" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.InstanceEndpoint), global::Google.Cloud.Memorystore.V1.Instance.Types.InstanceEndpoint.Parser, new[]{ "Connections" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.Instance.Types.ConnectionDetail), global::Google.Cloud.Memorystore.V1.Instance.Types.ConnectionDetail.Parser, new[]{ "PscAutoConnection", "PscConnection" }, new[]{ "Connection" }, null, null, null), + null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.PscAutoConnection), global::Google.Cloud.Memorystore.V1.PscAutoConnection.Parser, new[]{ "Port", "PscConnectionId", "IpAddress", "ForwardingRule", "ProjectId", "Network", "ServiceAttachment", "PscConnectionStatus", "ConnectionType" }, new[]{ "Ports" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.PscConnection), global::Google.Cloud.Memorystore.V1.PscConnection.Parser, new[]{ "PscConnectionId", "IpAddress", "ForwardingRule", "ProjectId", "Network", "ServiceAttachment", "PscConnectionStatus", "ConnectionType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.DiscoveryEndpoint), global::Google.Cloud.Memorystore.V1.DiscoveryEndpoint.Parser, new[]{ "Address", "Port", "Network" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig), global::Google.Cloud.Memorystore.V1.PersistenceConfig.Parser, new[]{ "Mode", "RdbConfig", "AofConfig" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig), global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Parser, new[]{ "RdbSnapshotPeriod", "RdbSnapshotStartTime" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig), global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Parser, new[]{ "AppendFsync" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) }, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.NodeConfig), global::Google.Cloud.Memorystore.V1.NodeConfig.Parser, new[]{ "SizeGb" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig), global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Parser, new[]{ "Zone", "Mode" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.ListInstancesRequest), global::Google.Cloud.Memorystore.V1.ListInstancesRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter", "OrderBy" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.ListInstancesResponse), global::Google.Cloud.Memorystore.V1.ListInstancesResponse.Parser, new[]{ "Instances", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.GetInstanceRequest), global::Google.Cloud.Memorystore.V1.GetInstanceRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest), global::Google.Cloud.Memorystore.V1.CreateInstanceRequest.Parser, new[]{ "Parent", "InstanceId", "Instance", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest), global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest.Parser, new[]{ "UpdateMask", "Instance", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest), global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest.Parser, new[]{ "Name", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest), global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.CertificateAuthority), global::Google.Cloud.Memorystore.V1.CertificateAuthority.Parser, new[]{ "ManagedServerCa", "Name" }, new[]{ "ServerCa" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority), global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority.Parser, new[]{ "CaCerts" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain), global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain.Parser, new[]{ "Certificates" }, null, null, null, null)})}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1.OperationMetadata), global::Google.Cloud.Memorystore.V1.OperationMetadata.Parser, new[]{ "CreateTime", "EndTime", "Target", "Verb", "StatusMessage", "RequestedCancellation", "ApiVersion" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Status of the PSC connection. + /// + public enum PscConnectionStatus { + /// + /// PSC connection status is not specified. + /// + [pbr::OriginalName("PSC_CONNECTION_STATUS_UNSPECIFIED")] Unspecified = 0, + /// + /// The connection is active + /// + [pbr::OriginalName("ACTIVE")] Active = 1, + /// + /// Connection not found + /// + [pbr::OriginalName("NOT_FOUND")] NotFound = 2, + } + + /// + /// Type of a PSC connection + /// + public enum ConnectionType { + /// + /// Connection Type is not set + /// + [pbr::OriginalName("CONNECTION_TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Connection that will be used for topology discovery. + /// + [pbr::OriginalName("CONNECTION_TYPE_DISCOVERY")] Discovery = 1, + /// + /// Connection that will be used as primary endpoint to access primary. + /// + [pbr::OriginalName("CONNECTION_TYPE_PRIMARY")] Primary = 2, + /// + /// Connection that will be used as reader endpoint to access replicas. + /// + [pbr::OriginalName("CONNECTION_TYPE_READER")] Reader = 3, + } + + #endregion + + #region Messages + /// + /// A Memorystore instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Instance : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Instance()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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.Memorystore.V1.MemorystoreReflection.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 Instance() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance(Instance other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + updateTime_ = other.updateTime_ != null ? other.updateTime_.Clone() : null; + labels_ = other.labels_.Clone(); + state_ = other.state_; + stateInfo_ = other.stateInfo_ != null ? other.stateInfo_.Clone() : null; + uid_ = other.uid_; + replicaCount_ = other.replicaCount_; + authorizationMode_ = other.authorizationMode_; + transitEncryptionMode_ = other.transitEncryptionMode_; + shardCount_ = other.shardCount_; + discoveryEndpoints_ = other.discoveryEndpoints_.Clone(); + nodeType_ = other.nodeType_; + persistenceConfig_ = other.persistenceConfig_ != null ? other.persistenceConfig_.Clone() : null; + engineVersion_ = other.engineVersion_; + engineConfigs_ = other.engineConfigs_.Clone(); + nodeConfig_ = other.nodeConfig_ != null ? other.nodeConfig_.Clone() : null; + zoneDistributionConfig_ = other.zoneDistributionConfig_ != null ? other.zoneDistributionConfig_.Clone() : null; + deletionProtectionEnabled_ = other.deletionProtectionEnabled_; + pscAutoConnections_ = other.pscAutoConnections_.Clone(); + endpoints_ = other.endpoints_.Clone(); + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance Clone() { + return new Instance(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. Unique name of the instance. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 "create_time" field. + public const int CreateTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. Creation timestamp of the instance. + /// + [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 "update_time" field. + public const int UpdateTimeFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp updateTime_; + /// + /// Output only. Latest update timestamp of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp UpdateTime { + get { return updateTime_; } + set { + updateTime_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 34); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Optional. Labels to represent user-provided metadata. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 5; + private global::Google.Cloud.Memorystore.V1.Instance.Types.State state_ = global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified; + /// + /// Output only. Current state of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.State State { + get { return state_; } + set { + state_ = value; + } + } + + /// Field number for the "state_info" field. + public const int StateInfoFieldNumber = 6; + private global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo stateInfo_; + /// + /// Output only. Additional information about the state of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo StateInfo { + get { return stateInfo_; } + set { + stateInfo_ = value; + } + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 7; + private string uid_ = ""; + /// + /// Output only. System assigned, unique identifier for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "replica_count" field. + public const int ReplicaCountFieldNumber = 8; + private readonly static int ReplicaCountDefaultValue = 0; + + private int replicaCount_; + /// + /// Optional. Number of replica nodes per shard. If omitted the default is 0 + /// replicas. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ReplicaCount { + get { if ((_hasBits0 & 1) != 0) { return replicaCount_; } else { return ReplicaCountDefaultValue; } } + set { + _hasBits0 |= 1; + replicaCount_ = value; + } + } + /// Gets whether the "replica_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasReplicaCount { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "replica_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearReplicaCount() { + _hasBits0 &= ~1; + } + + /// Field number for the "authorization_mode" field. + public const int AuthorizationModeFieldNumber = 9; + private global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode authorizationMode_ = global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified; + /// + /// Optional. Immutable. Authorization mode of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode AuthorizationMode { + get { return authorizationMode_; } + set { + authorizationMode_ = value; + } + } + + /// Field number for the "transit_encryption_mode" field. + public const int TransitEncryptionModeFieldNumber = 10; + private global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode transitEncryptionMode_ = global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified; + /// + /// Optional. Immutable. In-transit encryption mode of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode TransitEncryptionMode { + get { return transitEncryptionMode_; } + set { + transitEncryptionMode_ = value; + } + } + + /// Field number for the "shard_count" field. + public const int ShardCountFieldNumber = 11; + private int shardCount_; + /// + /// Optional. Number of shards for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ShardCount { + get { return shardCount_; } + set { + shardCount_ = value; + } + } + + /// Field number for the "discovery_endpoints" field. + public const int DiscoveryEndpointsFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_discoveryEndpoints_codec + = pb::FieldCodec.ForMessage(98, global::Google.Cloud.Memorystore.V1.DiscoveryEndpoint.Parser); + private readonly pbc::RepeatedField discoveryEndpoints_ = new pbc::RepeatedField(); + /// + /// Output only. Endpoints clients can connect to the instance through. + /// Currently only one discovery endpoint is supported. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DiscoveryEndpoints { + get { return discoveryEndpoints_; } + } + + /// Field number for the "node_type" field. + public const int NodeTypeFieldNumber = 13; + private global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType nodeType_ = global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified; + /// + /// Optional. Immutable. Machine type for individual nodes of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType NodeType { + get { return nodeType_; } + set { + nodeType_ = value; + } + } + + /// Field number for the "persistence_config" field. + public const int PersistenceConfigFieldNumber = 14; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig persistenceConfig_; + /// + /// Optional. Persistence configuration of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig PersistenceConfig { + get { return persistenceConfig_; } + set { + persistenceConfig_ = value; + } + } + + /// Field number for the "engine_version" field. + public const int EngineVersionFieldNumber = 15; + private string engineVersion_ = ""; + /// + /// Optional. Immutable. Engine version of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EngineVersion { + get { return engineVersion_; } + set { + engineVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "engine_configs" field. + public const int EngineConfigsFieldNumber = 16; + private static readonly pbc::MapField.Codec _map_engineConfigs_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 130); + private readonly pbc::MapField engineConfigs_ = new pbc::MapField(); + /// + /// Optional. User-provided engine configurations for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField EngineConfigs { + get { return engineConfigs_; } + } + + /// Field number for the "node_config" field. + public const int NodeConfigFieldNumber = 17; + private global::Google.Cloud.Memorystore.V1.NodeConfig nodeConfig_; + /// + /// Output only. Configuration of individual nodes of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.NodeConfig NodeConfig { + get { return nodeConfig_; } + set { + nodeConfig_ = value; + } + } + + /// Field number for the "zone_distribution_config" field. + public const int ZoneDistributionConfigFieldNumber = 18; + private global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig zoneDistributionConfig_; + /// + /// Optional. Immutable. Zone distribution configuration of the instance for + /// node allocation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig ZoneDistributionConfig { + get { return zoneDistributionConfig_; } + set { + zoneDistributionConfig_ = value; + } + } + + /// Field number for the "deletion_protection_enabled" field. + public const int DeletionProtectionEnabledFieldNumber = 19; + private readonly static bool DeletionProtectionEnabledDefaultValue = false; + + private bool deletionProtectionEnabled_; + /// + /// Optional. If set to true deletion of the instance will fail. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeletionProtectionEnabled { + get { if ((_hasBits0 & 2) != 0) { return deletionProtectionEnabled_; } else { return DeletionProtectionEnabledDefaultValue; } } + set { + _hasBits0 |= 2; + deletionProtectionEnabled_ = value; + } + } + /// Gets whether the "deletion_protection_enabled" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeletionProtectionEnabled { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "deletion_protection_enabled" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeletionProtectionEnabled() { + _hasBits0 &= ~2; + } + + /// Field number for the "psc_auto_connections" field. + public const int PscAutoConnectionsFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_pscAutoConnections_codec + = pb::FieldCodec.ForMessage(162, global::Google.Cloud.Memorystore.V1.PscAutoConnection.Parser); + private readonly pbc::RepeatedField pscAutoConnections_ = new pbc::RepeatedField(); + /// + /// Required. Immutable. User inputs and resource details of the auto-created + /// PSC connections. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PscAutoConnections { + get { return pscAutoConnections_; } + } + + /// Field number for the "endpoints" field. + public const int EndpointsFieldNumber = 25; + private static readonly pb::FieldCodec _repeated_endpoints_codec + = pb::FieldCodec.ForMessage(202, global::Google.Cloud.Memorystore.V1.Instance.Types.InstanceEndpoint.Parser); + private readonly pbc::RepeatedField endpoints_ = new pbc::RepeatedField(); + /// + /// Optional. Endpoints for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Endpoints { + get { return endpoints_; } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 26; + private global::Google.Cloud.Memorystore.V1.Instance.Types.Mode mode_ = global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified; + /// + /// Optional. The mode config for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Instance); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Instance other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(UpdateTime, other.UpdateTime)) return false; + if (!Labels.Equals(other.Labels)) return false; + if (State != other.State) return false; + if (!object.Equals(StateInfo, other.StateInfo)) return false; + if (Uid != other.Uid) return false; + if (ReplicaCount != other.ReplicaCount) return false; + if (AuthorizationMode != other.AuthorizationMode) return false; + if (TransitEncryptionMode != other.TransitEncryptionMode) return false; + if (ShardCount != other.ShardCount) return false; + if(!discoveryEndpoints_.Equals(other.discoveryEndpoints_)) return false; + if (NodeType != other.NodeType) return false; + if (!object.Equals(PersistenceConfig, other.PersistenceConfig)) return false; + if (EngineVersion != other.EngineVersion) return false; + if (!EngineConfigs.Equals(other.EngineConfigs)) return false; + if (!object.Equals(NodeConfig, other.NodeConfig)) return false; + if (!object.Equals(ZoneDistributionConfig, other.ZoneDistributionConfig)) return false; + if (DeletionProtectionEnabled != other.DeletionProtectionEnabled) return false; + if(!pscAutoConnections_.Equals(other.pscAutoConnections_)) return false; + if(!endpoints_.Equals(other.endpoints_)) return false; + if (Mode != other.Mode) 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 (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (updateTime_ != null) hash ^= UpdateTime.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (State != global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified) hash ^= State.GetHashCode(); + if (stateInfo_ != null) hash ^= StateInfo.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (HasReplicaCount) hash ^= ReplicaCount.GetHashCode(); + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified) hash ^= AuthorizationMode.GetHashCode(); + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified) hash ^= TransitEncryptionMode.GetHashCode(); + if (ShardCount != 0) hash ^= ShardCount.GetHashCode(); + hash ^= discoveryEndpoints_.GetHashCode(); + if (NodeType != global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified) hash ^= NodeType.GetHashCode(); + if (persistenceConfig_ != null) hash ^= PersistenceConfig.GetHashCode(); + if (EngineVersion.Length != 0) hash ^= EngineVersion.GetHashCode(); + hash ^= EngineConfigs.GetHashCode(); + if (nodeConfig_ != null) hash ^= NodeConfig.GetHashCode(); + if (zoneDistributionConfig_ != null) hash ^= ZoneDistributionConfig.GetHashCode(); + if (HasDeletionProtectionEnabled) hash ^= DeletionProtectionEnabled.GetHashCode(); + hash ^= pscAutoConnections_.GetHashCode(); + hash ^= endpoints_.GetHashCode(); + if (Mode != global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified) hash ^= Mode.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 (createTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UpdateTime); + } + labels_.WriteTo(output, _map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) State); + } + if (stateInfo_ != null) { + output.WriteRawTag(50); + output.WriteMessage(StateInfo); + } + if (Uid.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Uid); + } + if (HasReplicaCount) { + output.WriteRawTag(64); + output.WriteInt32(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified) { + output.WriteRawTag(72); + output.WriteEnum((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified) { + output.WriteRawTag(80); + output.WriteEnum((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + output.WriteRawTag(88); + output.WriteInt32(ShardCount); + } + discoveryEndpoints_.WriteTo(output, _repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified) { + output.WriteRawTag(104); + output.WriteEnum((int) NodeType); + } + if (persistenceConfig_ != null) { + output.WriteRawTag(114); + output.WriteMessage(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + output.WriteRawTag(122); + output.WriteString(EngineVersion); + } + engineConfigs_.WriteTo(output, _map_engineConfigs_codec); + if (nodeConfig_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + output.WriteRawTag(152, 1); + output.WriteBool(DeletionProtectionEnabled); + } + pscAutoConnections_.WriteTo(output, _repeated_pscAutoConnections_codec); + endpoints_.WriteTo(output, _repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified) { + output.WriteRawTag(208, 1); + output.WriteEnum((int) Mode); + } + 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 (createTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UpdateTime); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) State); + } + if (stateInfo_ != null) { + output.WriteRawTag(50); + output.WriteMessage(StateInfo); + } + if (Uid.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Uid); + } + if (HasReplicaCount) { + output.WriteRawTag(64); + output.WriteInt32(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified) { + output.WriteRawTag(72); + output.WriteEnum((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified) { + output.WriteRawTag(80); + output.WriteEnum((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + output.WriteRawTag(88); + output.WriteInt32(ShardCount); + } + discoveryEndpoints_.WriteTo(ref output, _repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified) { + output.WriteRawTag(104); + output.WriteEnum((int) NodeType); + } + if (persistenceConfig_ != null) { + output.WriteRawTag(114); + output.WriteMessage(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + output.WriteRawTag(122); + output.WriteString(EngineVersion); + } + engineConfigs_.WriteTo(ref output, _map_engineConfigs_codec); + if (nodeConfig_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + output.WriteRawTag(152, 1); + output.WriteBool(DeletionProtectionEnabled); + } + pscAutoConnections_.WriteTo(ref output, _repeated_pscAutoConnections_codec); + endpoints_.WriteTo(ref output, _repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified) { + output.WriteRawTag(208, 1); + output.WriteEnum((int) Mode); + } + 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 (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (updateTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateTime); + } + size += labels_.CalculateSize(_map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + if (stateInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StateInfo); + } + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid); + } + if (HasReplicaCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ShardCount); + } + size += discoveryEndpoints_.CalculateSize(_repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NodeType); + } + if (persistenceConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EngineVersion); + } + size += engineConfigs_.CalculateSize(_map_engineConfigs_codec); + if (nodeConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + size += 2 + 1; + } + size += pscAutoConnections_.CalculateSize(_repeated_pscAutoConnections_codec); + size += endpoints_.CalculateSize(_repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Instance other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.updateTime_ != null) { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + UpdateTime.MergeFrom(other.UpdateTime); + } + labels_.MergeFrom(other.labels_); + if (other.State != global::Google.Cloud.Memorystore.V1.Instance.Types.State.Unspecified) { + State = other.State; + } + if (other.stateInfo_ != null) { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo(); + } + StateInfo.MergeFrom(other.StateInfo); + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.HasReplicaCount) { + ReplicaCount = other.ReplicaCount; + } + if (other.AuthorizationMode != global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode.Unspecified) { + AuthorizationMode = other.AuthorizationMode; + } + if (other.TransitEncryptionMode != global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode.Unspecified) { + TransitEncryptionMode = other.TransitEncryptionMode; + } + if (other.ShardCount != 0) { + ShardCount = other.ShardCount; + } + discoveryEndpoints_.Add(other.discoveryEndpoints_); + if (other.NodeType != global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType.Unspecified) { + NodeType = other.NodeType; + } + if (other.persistenceConfig_ != null) { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig(); + } + PersistenceConfig.MergeFrom(other.PersistenceConfig); + } + if (other.EngineVersion.Length != 0) { + EngineVersion = other.EngineVersion; + } + engineConfigs_.MergeFrom(other.engineConfigs_); + if (other.nodeConfig_ != null) { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1.NodeConfig(); + } + NodeConfig.MergeFrom(other.NodeConfig); + } + if (other.zoneDistributionConfig_ != null) { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig(); + } + ZoneDistributionConfig.MergeFrom(other.ZoneDistributionConfig); + } + if (other.HasDeletionProtectionEnabled) { + DeletionProtectionEnabled = other.DeletionProtectionEnabled; + } + pscAutoConnections_.Add(other.pscAutoConnections_); + endpoints_.Add(other.endpoints_); + if (other.Mode != global::Google.Cloud.Memorystore.V1.Instance.Types.Mode.Unspecified) { + Mode = other.Mode; + } + _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 (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 26: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 34: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 40: { + State = (global::Google.Cloud.Memorystore.V1.Instance.Types.State) input.ReadEnum(); + break; + } + case 50: { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo(); + } + input.ReadMessage(StateInfo); + break; + } + case 58: { + Uid = input.ReadString(); + break; + } + case 64: { + ReplicaCount = input.ReadInt32(); + break; + } + case 72: { + AuthorizationMode = (global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode) input.ReadEnum(); + break; + } + case 80: { + TransitEncryptionMode = (global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode) input.ReadEnum(); + break; + } + case 88: { + ShardCount = input.ReadInt32(); + break; + } + case 98: { + discoveryEndpoints_.AddEntriesFrom(input, _repeated_discoveryEndpoints_codec); + break; + } + case 104: { + NodeType = (global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType) input.ReadEnum(); + break; + } + case 114: { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig(); + } + input.ReadMessage(PersistenceConfig); + break; + } + case 122: { + EngineVersion = input.ReadString(); + break; + } + case 130: { + engineConfigs_.AddEntriesFrom(input, _map_engineConfigs_codec); + break; + } + case 138: { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1.NodeConfig(); + } + input.ReadMessage(NodeConfig); + break; + } + case 146: { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig(); + } + input.ReadMessage(ZoneDistributionConfig); + break; + } + case 152: { + DeletionProtectionEnabled = input.ReadBool(); + break; + } + case 162: { + pscAutoConnections_.AddEntriesFrom(input, _repeated_pscAutoConnections_codec); + break; + } + case 202: { + endpoints_.AddEntriesFrom(input, _repeated_endpoints_codec); + break; + } + case 208: { + Mode = (global::Google.Cloud.Memorystore.V1.Instance.Types.Mode) 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: { + Name = input.ReadString(); + break; + } + case 18: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 26: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 34: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 40: { + State = (global::Google.Cloud.Memorystore.V1.Instance.Types.State) input.ReadEnum(); + break; + } + case 50: { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo(); + } + input.ReadMessage(StateInfo); + break; + } + case 58: { + Uid = input.ReadString(); + break; + } + case 64: { + ReplicaCount = input.ReadInt32(); + break; + } + case 72: { + AuthorizationMode = (global::Google.Cloud.Memorystore.V1.Instance.Types.AuthorizationMode) input.ReadEnum(); + break; + } + case 80: { + TransitEncryptionMode = (global::Google.Cloud.Memorystore.V1.Instance.Types.TransitEncryptionMode) input.ReadEnum(); + break; + } + case 88: { + ShardCount = input.ReadInt32(); + break; + } + case 98: { + discoveryEndpoints_.AddEntriesFrom(ref input, _repeated_discoveryEndpoints_codec); + break; + } + case 104: { + NodeType = (global::Google.Cloud.Memorystore.V1.Instance.Types.NodeType) input.ReadEnum(); + break; + } + case 114: { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig(); + } + input.ReadMessage(PersistenceConfig); + break; + } + case 122: { + EngineVersion = input.ReadString(); + break; + } + case 130: { + engineConfigs_.AddEntriesFrom(ref input, _map_engineConfigs_codec); + break; + } + case 138: { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1.NodeConfig(); + } + input.ReadMessage(NodeConfig); + break; + } + case 146: { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig(); + } + input.ReadMessage(ZoneDistributionConfig); + break; + } + case 152: { + DeletionProtectionEnabled = input.ReadBool(); + break; + } + case 162: { + pscAutoConnections_.AddEntriesFrom(ref input, _repeated_pscAutoConnections_codec); + break; + } + case 202: { + endpoints_.AddEntriesFrom(ref input, _repeated_endpoints_codec); + break; + } + case 208: { + Mode = (global::Google.Cloud.Memorystore.V1.Instance.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Instance message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible states of the instance. + /// + public enum State { + /// + /// Not set. + /// + [pbr::OriginalName("STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// Instance is being created. + /// + [pbr::OriginalName("CREATING")] Creating = 1, + /// + /// Instance has been created and is usable. + /// + [pbr::OriginalName("ACTIVE")] Active = 2, + /// + /// Instance is being updated. + /// + [pbr::OriginalName("UPDATING")] Updating = 3, + /// + /// Instance is being deleted. + /// + [pbr::OriginalName("DELETING")] Deleting = 4, + } + + /// + /// Possible authorization modes of the instance. + /// + public enum AuthorizationMode { + /// + /// Not set. + /// + [pbr::OriginalName("AUTHORIZATION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Authorization disabled. + /// + [pbr::OriginalName("AUTH_DISABLED")] AuthDisabled = 1, + /// + /// IAM basic authorization. + /// + [pbr::OriginalName("IAM_AUTH")] IamAuth = 2, + } + + /// + /// Possible in-transit encryption modes of the instance. + /// + public enum TransitEncryptionMode { + /// + /// Not set. + /// + [pbr::OriginalName("TRANSIT_ENCRYPTION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// In-transit encryption is disabled. + /// + [pbr::OriginalName("TRANSIT_ENCRYPTION_DISABLED")] TransitEncryptionDisabled = 1, + /// + /// Server-managed encryption is used for in-transit encryption. + /// + [pbr::OriginalName("SERVER_AUTHENTICATION")] ServerAuthentication = 2, + } + + /// + /// Possible node types of the instance. See + /// https://cloud.google.com/memorystore/docs/valkey/instance-node-specification + /// for more information. + /// + public enum NodeType { + /// + /// Not set. + /// + [pbr::OriginalName("NODE_TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Shared core nano. + /// + [pbr::OriginalName("SHARED_CORE_NANO")] SharedCoreNano = 1, + /// + /// High memory medium. + /// + [pbr::OriginalName("HIGHMEM_MEDIUM")] HighmemMedium = 2, + /// + /// High memory extra large. + /// + [pbr::OriginalName("HIGHMEM_XLARGE")] HighmemXlarge = 3, + /// + /// Standard small. + /// + [pbr::OriginalName("STANDARD_SMALL")] StandardSmall = 4, + } + + /// + /// The mode config, which is used to enable/disable cluster mode. + /// + public enum Mode { + /// + /// Mode is not specified. + /// + [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Instance is in standalone mode. + /// + [pbr::OriginalName("STANDALONE")] Standalone = 1, + /// + /// Instance is in cluster mode. + /// + [pbr::OriginalName("CLUSTER")] Cluster = 2, + } + + /// + /// Additional information about the state of the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StateInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StateInfo()); + 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.Memorystore.V1.Instance.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 StateInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StateInfo(StateInfo other) : this() { + switch (other.InfoCase) { + case InfoOneofCase.UpdateInfo: + UpdateInfo = other.UpdateInfo.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StateInfo Clone() { + return new StateInfo(this); + } + + /// Field number for the "update_info" field. + public const int UpdateInfoFieldNumber = 1; + /// + /// Output only. Describes ongoing update when instance state is UPDATING. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo UpdateInfo { + get { return infoCase_ == InfoOneofCase.UpdateInfo ? (global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo) info_ : null; } + set { + info_ = value; + infoCase_ = value == null ? InfoOneofCase.None : InfoOneofCase.UpdateInfo; + } + } + + private object info_; + /// Enum of possible cases for the "info" oneof. + public enum InfoOneofCase { + None = 0, + UpdateInfo = 1, + } + private InfoOneofCase infoCase_ = InfoOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InfoOneofCase InfoCase { + get { return infoCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInfo() { + infoCase_ = InfoOneofCase.None; + info_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StateInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StateInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(UpdateInfo, other.UpdateInfo)) return false; + if (InfoCase != other.InfoCase) 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 (infoCase_ == InfoOneofCase.UpdateInfo) hash ^= UpdateInfo.GetHashCode(); + hash ^= (int) infoCase_; + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + output.WriteRawTag(10); + output.WriteMessage(UpdateInfo); + } + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + output.WriteRawTag(10); + output.WriteMessage(UpdateInfo); + } + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateInfo); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StateInfo other) { + if (other == null) { + return; + } + switch (other.InfoCase) { + case InfoOneofCase.UpdateInfo: + if (UpdateInfo == null) { + UpdateInfo = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo(); + } + UpdateInfo.MergeFrom(other.UpdateInfo); + 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.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo subBuilder = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo(); + if (infoCase_ == InfoOneofCase.UpdateInfo) { + subBuilder.MergeFrom(UpdateInfo); + } + input.ReadMessage(subBuilder); + UpdateInfo = 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.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo subBuilder = new global::Google.Cloud.Memorystore.V1.Instance.Types.StateInfo.Types.UpdateInfo(); + if (infoCase_ == InfoOneofCase.UpdateInfo) { + subBuilder.MergeFrom(UpdateInfo); + } + input.ReadMessage(subBuilder); + UpdateInfo = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the StateInfo message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Represents information about instance with state UPDATING. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateInfo()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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.Memorystore.V1.Instance.Types.StateInfo.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 UpdateInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInfo(UpdateInfo other) : this() { + _hasBits0 = other._hasBits0; + targetShardCount_ = other.targetShardCount_; + targetReplicaCount_ = other.targetReplicaCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInfo Clone() { + return new UpdateInfo(this); + } + + /// Field number for the "target_shard_count" field. + public const int TargetShardCountFieldNumber = 1; + private readonly static int TargetShardCountDefaultValue = 0; + + private int targetShardCount_; + /// + /// Output only. Target number of shards for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TargetShardCount { + get { if ((_hasBits0 & 1) != 0) { return targetShardCount_; } else { return TargetShardCountDefaultValue; } } + set { + _hasBits0 |= 1; + targetShardCount_ = value; + } + } + /// Gets whether the "target_shard_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTargetShardCount { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "target_shard_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTargetShardCount() { + _hasBits0 &= ~1; + } + + /// Field number for the "target_replica_count" field. + public const int TargetReplicaCountFieldNumber = 2; + private readonly static int TargetReplicaCountDefaultValue = 0; + + private int targetReplicaCount_; + /// + /// Output only. Target number of replica nodes per shard for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TargetReplicaCount { + get { if ((_hasBits0 & 2) != 0) { return targetReplicaCount_; } else { return TargetReplicaCountDefaultValue; } } + set { + _hasBits0 |= 2; + targetReplicaCount_ = value; + } + } + /// Gets whether the "target_replica_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTargetReplicaCount { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "target_replica_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTargetReplicaCount() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TargetShardCount != other.TargetShardCount) return false; + if (TargetReplicaCount != other.TargetReplicaCount) 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 (HasTargetShardCount) hash ^= TargetShardCount.GetHashCode(); + if (HasTargetReplicaCount) hash ^= TargetReplicaCount.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 (HasTargetShardCount) { + output.WriteRawTag(8); + output.WriteInt32(TargetShardCount); + } + if (HasTargetReplicaCount) { + output.WriteRawTag(16); + output.WriteInt32(TargetReplicaCount); + } + 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 (HasTargetShardCount) { + output.WriteRawTag(8); + output.WriteInt32(TargetShardCount); + } + if (HasTargetReplicaCount) { + output.WriteRawTag(16); + output.WriteInt32(TargetReplicaCount); + } + 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 (HasTargetShardCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetShardCount); + } + if (HasTargetReplicaCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetReplicaCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateInfo other) { + if (other == null) { + return; + } + if (other.HasTargetShardCount) { + TargetShardCount = other.TargetShardCount; + } + if (other.HasTargetReplicaCount) { + TargetReplicaCount = other.TargetReplicaCount; + } + _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: { + TargetShardCount = input.ReadInt32(); + break; + } + case 16: { + TargetReplicaCount = 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 8: { + TargetShardCount = input.ReadInt32(); + break; + } + case 16: { + TargetReplicaCount = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// InstanceEndpoint consists of PSC connections that are created + /// as a group in each VPC network for accessing the instance. In each group, + /// there shall be one connection for each service attachment in the cluster. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InstanceEndpoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InstanceEndpoint()); + 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.Memorystore.V1.Instance.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 InstanceEndpoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceEndpoint(InstanceEndpoint other) : this() { + connections_ = other.connections_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceEndpoint Clone() { + return new InstanceEndpoint(this); + } + + /// Field number for the "connections" field. + public const int ConnectionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_connections_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1.Instance.Types.ConnectionDetail.Parser); + private readonly pbc::RepeatedField connections_ = new pbc::RepeatedField(); + /// + /// Optional. A group of PSC connections. They are created in the same VPC + /// network, one for each service attachment in the cluster. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Connections { + get { return connections_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InstanceEndpoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InstanceEndpoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!connections_.Equals(other.connections_)) 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 ^= connections_.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 + connections_.WriteTo(output, _repeated_connections_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) { + connections_.WriteTo(ref output, _repeated_connections_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 += connections_.CalculateSize(_repeated_connections_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InstanceEndpoint other) { + if (other == null) { + return; + } + connections_.Add(other.connections_); + _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: { + connections_.AddEntriesFrom(input, _repeated_connections_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: { + connections_.AddEntriesFrom(ref input, _repeated_connections_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Information of each PSC connection. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConnectionDetail : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConnectionDetail()); + 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.Memorystore.V1.Instance.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 ConnectionDetail() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionDetail(ConnectionDetail other) : this() { + switch (other.ConnectionCase) { + case ConnectionOneofCase.PscAutoConnection: + PscAutoConnection = other.PscAutoConnection.Clone(); + break; + case ConnectionOneofCase.PscConnection: + PscConnection = other.PscConnection.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionDetail Clone() { + return new ConnectionDetail(this); + } + + /// Field number for the "psc_auto_connection" field. + public const int PscAutoConnectionFieldNumber = 1; + /// + /// Detailed information of a PSC connection that is created through + /// service connectivity automation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PscAutoConnection PscAutoConnection { + get { return connectionCase_ == ConnectionOneofCase.PscAutoConnection ? (global::Google.Cloud.Memorystore.V1.PscAutoConnection) connection_ : null; } + set { + connection_ = value; + connectionCase_ = value == null ? ConnectionOneofCase.None : ConnectionOneofCase.PscAutoConnection; + } + } + + /// Field number for the "psc_connection" field. + public const int PscConnectionFieldNumber = 2; + /// + /// Detailed information of a PSC connection that is created by the user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PscConnection PscConnection { + get { return connectionCase_ == ConnectionOneofCase.PscConnection ? (global::Google.Cloud.Memorystore.V1.PscConnection) connection_ : null; } + set { + connection_ = value; + connectionCase_ = value == null ? ConnectionOneofCase.None : ConnectionOneofCase.PscConnection; + } + } + + private object connection_; + /// Enum of possible cases for the "connection" oneof. + public enum ConnectionOneofCase { + None = 0, + PscAutoConnection = 1, + PscConnection = 2, + } + private ConnectionOneofCase connectionCase_ = ConnectionOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionOneofCase ConnectionCase { + get { return connectionCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearConnection() { + connectionCase_ = ConnectionOneofCase.None; + connection_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConnectionDetail); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConnectionDetail other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(PscAutoConnection, other.PscAutoConnection)) return false; + if (!object.Equals(PscConnection, other.PscConnection)) return false; + if (ConnectionCase != other.ConnectionCase) 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) hash ^= PscAutoConnection.GetHashCode(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) hash ^= PscConnection.GetHashCode(); + hash ^= (int) connectionCase_; + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + output.WriteRawTag(10); + output.WriteMessage(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + output.WriteRawTag(18); + output.WriteMessage(PscConnection); + } + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + output.WriteRawTag(10); + output.WriteMessage(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + output.WriteRawTag(18); + output.WriteMessage(PscConnection); + } + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PscConnection); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConnectionDetail other) { + if (other == null) { + return; + } + switch (other.ConnectionCase) { + case ConnectionOneofCase.PscAutoConnection: + if (PscAutoConnection == null) { + PscAutoConnection = new global::Google.Cloud.Memorystore.V1.PscAutoConnection(); + } + PscAutoConnection.MergeFrom(other.PscAutoConnection); + break; + case ConnectionOneofCase.PscConnection: + if (PscConnection == null) { + PscConnection = new global::Google.Cloud.Memorystore.V1.PscConnection(); + } + PscConnection.MergeFrom(other.PscConnection); + 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.Memorystore.V1.PscAutoConnection subBuilder = new global::Google.Cloud.Memorystore.V1.PscAutoConnection(); + if (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + subBuilder.MergeFrom(PscAutoConnection); + } + input.ReadMessage(subBuilder); + PscAutoConnection = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1.PscConnection subBuilder = new global::Google.Cloud.Memorystore.V1.PscConnection(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + subBuilder.MergeFrom(PscConnection); + } + input.ReadMessage(subBuilder); + PscConnection = 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.Memorystore.V1.PscAutoConnection subBuilder = new global::Google.Cloud.Memorystore.V1.PscAutoConnection(); + if (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + subBuilder.MergeFrom(PscAutoConnection); + } + input.ReadMessage(subBuilder); + PscAutoConnection = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1.PscConnection subBuilder = new global::Google.Cloud.Memorystore.V1.PscConnection(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + subBuilder.MergeFrom(PscConnection); + } + input.ReadMessage(subBuilder); + PscConnection = subBuilder; + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Details of consumer resources in a PSC connection. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PscAutoConnection : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PscAutoConnection()); + 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.Memorystore.V1.MemorystoreReflection.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 PscAutoConnection() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscAutoConnection(PscAutoConnection other) : this() { + pscConnectionId_ = other.pscConnectionId_; + ipAddress_ = other.ipAddress_; + forwardingRule_ = other.forwardingRule_; + projectId_ = other.projectId_; + network_ = other.network_; + serviceAttachment_ = other.serviceAttachment_; + pscConnectionStatus_ = other.pscConnectionStatus_; + connectionType_ = other.connectionType_; + switch (other.PortsCase) { + case PortsOneofCase.Port: + Port = other.Port; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscAutoConnection Clone() { + return new PscAutoConnection(this); + } + + /// Field number for the "port" field. + public const int PortFieldNumber = 9; + /// + /// Optional. Output only. port will only be set for Primary/Reader or + /// Discovery endpoint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Port { + get { return HasPort ? (int) ports_ : 0; } + set { + ports_ = value; + portsCase_ = PortsOneofCase.Port; + } + } + /// Gets whether the "port" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPort { + get { return portsCase_ == PortsOneofCase.Port; } + } + /// Clears the value of the oneof if it's currently set to "port" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPort() { + if (HasPort) { + ClearPorts(); + } + } + + /// Field number for the "psc_connection_id" field. + public const int PscConnectionIdFieldNumber = 1; + private string pscConnectionId_ = ""; + /// + /// Output only. The PSC connection id of the forwarding rule connected to the + /// service attachment. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PscConnectionId { + get { return pscConnectionId_; } + set { + pscConnectionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ip_address" field. + public const int IpAddressFieldNumber = 2; + private string ipAddress_ = ""; + /// + /// Output only. The IP allocated on the consumer network for the PSC + /// forwarding rule. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "forwarding_rule" field. + public const int ForwardingRuleFieldNumber = 3; + private string forwardingRule_ = ""; + /// + /// Output only. The URI of the consumer side forwarding rule. + /// Format: + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ForwardingRule { + get { return forwardingRule_; } + set { + forwardingRule_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "project_id" field. + public const int ProjectIdFieldNumber = 4; + private string projectId_ = ""; + /// + /// Required. The consumer project_id where PSC connections are established. + /// This should be the same project_id that the instance is being created in. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProjectId { + get { return projectId_; } + set { + projectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 5; + private string network_ = ""; + /// + /// Required. The network where the PSC endpoints are created, in the form of + /// projects/{project_id}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "service_attachment" field. + public const int ServiceAttachmentFieldNumber = 6; + private string serviceAttachment_ = ""; + /// + /// Output only. The service attachment which is the target of the PSC + /// connection, in the form of + /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ServiceAttachment { + get { return serviceAttachment_; } + set { + serviceAttachment_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "psc_connection_status" field. + public const int PscConnectionStatusFieldNumber = 7; + private global::Google.Cloud.Memorystore.V1.PscConnectionStatus pscConnectionStatus_ = global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified; + /// + /// Output only. The status of the PSC connection: whether a connection exists + /// and ACTIVE or it no longer exists. Please note that this value is updated + /// periodically. Please use Private Service Connect APIs for the latest + /// status. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PscConnectionStatus PscConnectionStatus { + get { return pscConnectionStatus_; } + set { + pscConnectionStatus_ = value; + } + } + + /// Field number for the "connection_type" field. + public const int ConnectionTypeFieldNumber = 8; + private global::Google.Cloud.Memorystore.V1.ConnectionType connectionType_ = global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified; + /// + /// Output only. Type of the PSC connection. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.ConnectionType ConnectionType { + get { return connectionType_; } + set { + connectionType_ = value; + } + } + + private object ports_; + /// Enum of possible cases for the "ports" oneof. + public enum PortsOneofCase { + None = 0, + Port = 9, + } + private PortsOneofCase portsCase_ = PortsOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PortsOneofCase PortsCase { + get { return portsCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPorts() { + portsCase_ = PortsOneofCase.None; + ports_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PscAutoConnection); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PscAutoConnection other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Port != other.Port) return false; + if (PscConnectionId != other.PscConnectionId) return false; + if (IpAddress != other.IpAddress) return false; + if (ForwardingRule != other.ForwardingRule) return false; + if (ProjectId != other.ProjectId) return false; + if (Network != other.Network) return false; + if (ServiceAttachment != other.ServiceAttachment) return false; + if (PscConnectionStatus != other.PscConnectionStatus) return false; + if (ConnectionType != other.ConnectionType) return false; + if (PortsCase != other.PortsCase) 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 (HasPort) hash ^= Port.GetHashCode(); + if (PscConnectionId.Length != 0) hash ^= PscConnectionId.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (ForwardingRule.Length != 0) hash ^= ForwardingRule.GetHashCode(); + if (ProjectId.Length != 0) hash ^= ProjectId.GetHashCode(); + if (Network.Length != 0) hash ^= Network.GetHashCode(); + if (ServiceAttachment.Length != 0) hash ^= ServiceAttachment.GetHashCode(); + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) hash ^= PscConnectionStatus.GetHashCode(); + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) hash ^= ConnectionType.GetHashCode(); + hash ^= (int) portsCase_; + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + if (HasPort) { + output.WriteRawTag(72); + output.WriteInt32(Port); + } + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + if (HasPort) { + output.WriteRawTag(72); + output.WriteInt32(Port); + } + 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 (HasPort) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + } + if (PscConnectionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PscConnectionId); + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (ForwardingRule.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ForwardingRule); + } + if (ProjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProjectId); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (ServiceAttachment.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ConnectionType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PscAutoConnection other) { + if (other == null) { + return; + } + if (other.PscConnectionId.Length != 0) { + PscConnectionId = other.PscConnectionId; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.ForwardingRule.Length != 0) { + ForwardingRule = other.ForwardingRule; + } + if (other.ProjectId.Length != 0) { + ProjectId = other.ProjectId; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + if (other.ServiceAttachment.Length != 0) { + ServiceAttachment = other.ServiceAttachment; + } + if (other.PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + PscConnectionStatus = other.PscConnectionStatus; + } + if (other.ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + ConnectionType = other.ConnectionType; + } + switch (other.PortsCase) { + case PortsOneofCase.Port: + Port = other.Port; + 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1.ConnectionType) input.ReadEnum(); + break; + } + case 72: { + Port = 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1.ConnectionType) input.ReadEnum(); + break; + } + case 72: { + Port = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// User created Psc connection configuration. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PscConnection : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PscConnection()); + 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.Memorystore.V1.MemorystoreReflection.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 PscConnection() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscConnection(PscConnection other) : this() { + pscConnectionId_ = other.pscConnectionId_; + ipAddress_ = other.ipAddress_; + forwardingRule_ = other.forwardingRule_; + projectId_ = other.projectId_; + network_ = other.network_; + serviceAttachment_ = other.serviceAttachment_; + pscConnectionStatus_ = other.pscConnectionStatus_; + connectionType_ = other.connectionType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscConnection Clone() { + return new PscConnection(this); + } + + /// Field number for the "psc_connection_id" field. + public const int PscConnectionIdFieldNumber = 1; + private string pscConnectionId_ = ""; + /// + /// Output only. The PSC connection id of the forwarding rule connected to the + /// service attachment. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PscConnectionId { + get { return pscConnectionId_; } + set { + pscConnectionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ip_address" field. + public const int IpAddressFieldNumber = 2; + private string ipAddress_ = ""; + /// + /// Required. The IP allocated on the consumer network for the PSC forwarding + /// rule. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "forwarding_rule" field. + public const int ForwardingRuleFieldNumber = 3; + private string forwardingRule_ = ""; + /// + /// Required. The URI of the consumer side forwarding rule. + /// Format: + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ForwardingRule { + get { return forwardingRule_; } + set { + forwardingRule_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "project_id" field. + public const int ProjectIdFieldNumber = 4; + private string projectId_ = ""; + /// + /// Output only. The consumer project_id where the forwarding rule is created + /// from. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProjectId { + get { return projectId_; } + set { + projectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 5; + private string network_ = ""; + /// + /// Required. The consumer network where the IP address resides, in the form of + /// projects/{project_id}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "service_attachment" field. + public const int ServiceAttachmentFieldNumber = 6; + private string serviceAttachment_ = ""; + /// + /// Required. The service attachment which is the target of the PSC connection, + /// in the form of + /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ServiceAttachment { + get { return serviceAttachment_; } + set { + serviceAttachment_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "psc_connection_status" field. + public const int PscConnectionStatusFieldNumber = 7; + private global::Google.Cloud.Memorystore.V1.PscConnectionStatus pscConnectionStatus_ = global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified; + /// + /// Output only. The status of the PSC connection: whether a connection exists + /// and ACTIVE or it no longer exists. Please note that this value is updated + /// periodically. Please use Private Service Connect APIs for the latest + /// status. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PscConnectionStatus PscConnectionStatus { + get { return pscConnectionStatus_; } + set { + pscConnectionStatus_ = value; + } + } + + /// Field number for the "connection_type" field. + public const int ConnectionTypeFieldNumber = 8; + private global::Google.Cloud.Memorystore.V1.ConnectionType connectionType_ = global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified; + /// + /// Output only. Type of the PSC connection. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.ConnectionType ConnectionType { + get { return connectionType_; } + set { + connectionType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PscConnection); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PscConnection other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PscConnectionId != other.PscConnectionId) return false; + if (IpAddress != other.IpAddress) return false; + if (ForwardingRule != other.ForwardingRule) return false; + if (ProjectId != other.ProjectId) return false; + if (Network != other.Network) return false; + if (ServiceAttachment != other.ServiceAttachment) return false; + if (PscConnectionStatus != other.PscConnectionStatus) return false; + if (ConnectionType != other.ConnectionType) 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 (PscConnectionId.Length != 0) hash ^= PscConnectionId.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (ForwardingRule.Length != 0) hash ^= ForwardingRule.GetHashCode(); + if (ProjectId.Length != 0) hash ^= ProjectId.GetHashCode(); + if (Network.Length != 0) hash ^= Network.GetHashCode(); + if (ServiceAttachment.Length != 0) hash ^= ServiceAttachment.GetHashCode(); + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) hash ^= PscConnectionStatus.GetHashCode(); + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) hash ^= ConnectionType.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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + 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 (PscConnectionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PscConnectionId); + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (ForwardingRule.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ForwardingRule); + } + if (ProjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProjectId); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (ServiceAttachment.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ConnectionType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PscConnection other) { + if (other == null) { + return; + } + if (other.PscConnectionId.Length != 0) { + PscConnectionId = other.PscConnectionId; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.ForwardingRule.Length != 0) { + ForwardingRule = other.ForwardingRule; + } + if (other.ProjectId.Length != 0) { + ProjectId = other.ProjectId; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + if (other.ServiceAttachment.Length != 0) { + ServiceAttachment = other.ServiceAttachment; + } + if (other.PscConnectionStatus != global::Google.Cloud.Memorystore.V1.PscConnectionStatus.Unspecified) { + PscConnectionStatus = other.PscConnectionStatus; + } + if (other.ConnectionType != global::Google.Cloud.Memorystore.V1.ConnectionType.Unspecified) { + ConnectionType = other.ConnectionType; + } + _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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1.ConnectionType) 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1.ConnectionType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Represents an endpoint for clients to connect to the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DiscoveryEndpoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DiscoveryEndpoint()); + 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.Memorystore.V1.MemorystoreReflection.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 DiscoveryEndpoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DiscoveryEndpoint(DiscoveryEndpoint other) : this() { + address_ = other.address_; + port_ = other.port_; + network_ = other.network_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DiscoveryEndpoint Clone() { + return new DiscoveryEndpoint(this); + } + + /// Field number for the "address" field. + public const int AddressFieldNumber = 1; + private string address_ = ""; + /// + /// Output only. IP address of the exposed endpoint clients connect to. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Address { + get { return address_; } + set { + address_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "port" field. + public const int PortFieldNumber = 2; + private int port_; + /// + /// Output only. The port number of the exposed endpoint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Port { + get { return port_; } + set { + port_ = value; + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 4; + private string network_ = ""; + /// + /// Output only. The network where the IP address of the discovery endpoint + /// will be reserved, in the form of + /// projects/{network_project}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = 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 DiscoveryEndpoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DiscoveryEndpoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Address != other.Address) return false; + if (Port != other.Port) return false; + if (Network != other.Network) 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 (Address.Length != 0) hash ^= Address.GetHashCode(); + if (Port != 0) hash ^= Port.GetHashCode(); + if (Network.Length != 0) hash ^= Network.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 (Address.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Address); + } + if (Port != 0) { + output.WriteRawTag(16); + output.WriteInt32(Port); + } + if (Network.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Network); + } + 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 (Address.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Address); + } + if (Port != 0) { + output.WriteRawTag(16); + output.WriteInt32(Port); + } + if (Network.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Network); + } + 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 (Address.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Address); + } + if (Port != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DiscoveryEndpoint other) { + if (other == null) { + return; + } + if (other.Address.Length != 0) { + Address = other.Address; + } + if (other.Port != 0) { + Port = other.Port; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + _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: { + Address = input.ReadString(); + break; + } + case 16: { + Port = input.ReadInt32(); + break; + } + case 34: { + Network = 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: { + Address = input.ReadString(); + break; + } + case 16: { + Port = input.ReadInt32(); + break; + } + case 34: { + Network = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Represents persistence configuration for a instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PersistenceConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PersistenceConfig()); + 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.Memorystore.V1.MemorystoreReflection.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 PersistenceConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersistenceConfig(PersistenceConfig other) : this() { + mode_ = other.mode_; + rdbConfig_ = other.rdbConfig_ != null ? other.rdbConfig_.Clone() : null; + aofConfig_ = other.aofConfig_ != null ? other.aofConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersistenceConfig Clone() { + return new PersistenceConfig(this); + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode mode_ = global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified; + /// + /// Optional. Current persistence mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + /// Field number for the "rdb_config" field. + public const int RdbConfigFieldNumber = 2; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig rdbConfig_; + /// + /// Optional. RDB configuration. This field will be ignored if mode is not RDB. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig RdbConfig { + get { return rdbConfig_; } + set { + rdbConfig_ = value; + } + } + + /// Field number for the "aof_config" field. + public const int AofConfigFieldNumber = 3; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig aofConfig_; + /// + /// Optional. AOF configuration. This field will be ignored if mode is not AOF. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig AofConfig { + get { return aofConfig_; } + set { + aofConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PersistenceConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PersistenceConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Mode != other.Mode) return false; + if (!object.Equals(RdbConfig, other.RdbConfig)) return false; + if (!object.Equals(AofConfig, other.AofConfig)) 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 (Mode != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified) hash ^= Mode.GetHashCode(); + if (rdbConfig_ != null) hash ^= RdbConfig.GetHashCode(); + if (aofConfig_ != null) hash ^= AofConfig.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 (Mode != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (rdbConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbConfig); + } + if (aofConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AofConfig); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (rdbConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbConfig); + } + if (aofConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AofConfig); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (rdbConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RdbConfig); + } + if (aofConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AofConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PersistenceConfig other) { + if (other == null) { + return; + } + if (other.Mode != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode.Unspecified) { + Mode = other.Mode; + } + if (other.rdbConfig_ != null) { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig(); + } + RdbConfig.MergeFrom(other.RdbConfig); + } + if (other.aofConfig_ != null) { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig(); + } + AofConfig.MergeFrom(other.AofConfig); + } + _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: { + Mode = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode) input.ReadEnum(); + break; + } + case 18: { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig(); + } + input.ReadMessage(RdbConfig); + break; + } + case 26: { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig(); + } + input.ReadMessage(AofConfig); + 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: { + Mode = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.PersistenceMode) input.ReadEnum(); + break; + } + case 18: { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig(); + } + input.ReadMessage(RdbConfig); + break; + } + case 26: { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig(); + } + input.ReadMessage(AofConfig); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the PersistenceConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible persistence modes. + /// + public enum PersistenceMode { + /// + /// Not set. + /// + [pbr::OriginalName("PERSISTENCE_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Persistence is disabled, and any snapshot data is deleted. + /// + [pbr::OriginalName("DISABLED")] Disabled = 1, + /// + /// RDB based persistence is enabled. + /// + [pbr::OriginalName("RDB")] Rdb = 2, + /// + /// AOF based persistence is enabled. + /// + [pbr::OriginalName("AOF")] Aof = 3, + } + + /// + /// Configuration for RDB based persistence. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RDBConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RDBConfig()); + 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.Memorystore.V1.PersistenceConfig.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 RDBConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RDBConfig(RDBConfig other) : this() { + rdbSnapshotPeriod_ = other.rdbSnapshotPeriod_; + rdbSnapshotStartTime_ = other.rdbSnapshotStartTime_ != null ? other.rdbSnapshotStartTime_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RDBConfig Clone() { + return new RDBConfig(this); + } + + /// Field number for the "rdb_snapshot_period" field. + public const int RdbSnapshotPeriodFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod rdbSnapshotPeriod_ = global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified; + /// + /// Optional. Period between RDB snapshots. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod RdbSnapshotPeriod { + get { return rdbSnapshotPeriod_; } + set { + rdbSnapshotPeriod_ = value; + } + } + + /// Field number for the "rdb_snapshot_start_time" field. + public const int RdbSnapshotStartTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp rdbSnapshotStartTime_; + /// + /// Optional. Time that the first snapshot was/will be attempted, and to + /// which future snapshots will be aligned. If not provided, the current time + /// will be used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp RdbSnapshotStartTime { + get { return rdbSnapshotStartTime_; } + set { + rdbSnapshotStartTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RDBConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RDBConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RdbSnapshotPeriod != other.RdbSnapshotPeriod) return false; + if (!object.Equals(RdbSnapshotStartTime, other.RdbSnapshotStartTime)) 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) hash ^= RdbSnapshotPeriod.GetHashCode(); + if (rdbSnapshotStartTime_ != null) hash ^= RdbSnapshotStartTime.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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbSnapshotStartTime); + } + 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbSnapshotStartTime); + } + 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RdbSnapshotStartTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RDBConfig other) { + if (other == null) { + return; + } + if (other.RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + RdbSnapshotPeriod = other.RdbSnapshotPeriod; + } + if (other.rdbSnapshotStartTime_ != null) { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + RdbSnapshotStartTime.MergeFrom(other.RdbSnapshotStartTime); + } + _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: { + RdbSnapshotPeriod = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) input.ReadEnum(); + break; + } + case 18: { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RdbSnapshotStartTime); + 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: { + RdbSnapshotPeriod = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) input.ReadEnum(); + break; + } + case 18: { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RdbSnapshotStartTime); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the RDBConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible snapshot periods. + /// + public enum SnapshotPeriod { + /// + /// Not set. + /// + [pbr::OriginalName("SNAPSHOT_PERIOD_UNSPECIFIED")] Unspecified = 0, + /// + /// One hour. + /// + [pbr::OriginalName("ONE_HOUR")] OneHour = 1, + /// + /// Six hours. + /// + [pbr::OriginalName("SIX_HOURS")] SixHours = 2, + /// + /// Twelve hours. + /// + [pbr::OriginalName("TWELVE_HOURS")] TwelveHours = 3, + /// + /// Twenty four hours. + /// + [pbr::OriginalName("TWENTY_FOUR_HOURS")] TwentyFourHours = 4, + } + + } + #endregion + + } + + /// + /// Configuration for AOF based persistence. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AOFConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AOFConfig()); + 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.Memorystore.V1.PersistenceConfig.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 AOFConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AOFConfig(AOFConfig other) : this() { + appendFsync_ = other.appendFsync_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AOFConfig Clone() { + return new AOFConfig(this); + } + + /// Field number for the "append_fsync" field. + public const int AppendFsyncFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync appendFsync_ = global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified; + /// + /// Optional. The fsync mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync AppendFsync { + get { return appendFsync_; } + set { + appendFsync_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AOFConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AOFConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AppendFsync != other.AppendFsync) 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 (AppendFsync != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) hash ^= AppendFsync.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 (AppendFsync != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AppendFsync); + } + 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 (AppendFsync != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AppendFsync); + } + 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 (AppendFsync != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AppendFsync); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AOFConfig other) { + if (other == null) { + return; + } + if (other.AppendFsync != global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + AppendFsync = other.AppendFsync; + } + _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: { + AppendFsync = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) 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: { + AppendFsync = (global::Google.Cloud.Memorystore.V1.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the AOFConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible fsync modes. + /// + public enum AppendFsync { + /// + /// Not set. Default: EVERY_SEC + /// + [pbr::OriginalName("APPEND_FSYNC_UNSPECIFIED")] Unspecified = 0, + /// + /// Never fsync. Normally Linux will flush data every 30 seconds with this + /// configuration, but it's up to the kernel's exact tuning. + /// + [pbr::OriginalName("NEVER")] Never = 1, + /// + /// Fsync every second. You may lose 1 second of data if there is a + /// disaster. + /// + [pbr::OriginalName("EVERY_SEC")] EverySec = 2, + /// + /// Fsync every time new write commands are appended to the AOF. The best + /// data loss protection at the cost of performance. + /// + [pbr::OriginalName("ALWAYS")] Always = 3, + } + + } + #endregion + + } + + } + #endregion + + } + + /// + /// Represents configuration for nodes of the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NodeConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeConfig()); + 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.Memorystore.V1.MemorystoreReflection.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 NodeConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeConfig(NodeConfig other) : this() { + sizeGb_ = other.sizeGb_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeConfig Clone() { + return new NodeConfig(this); + } + + /// Field number for the "size_gb" field. + public const int SizeGbFieldNumber = 1; + private double sizeGb_; + /// + /// Output only. Memory size in GB of the node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double SizeGb { + get { return sizeGb_; } + set { + sizeGb_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NodeConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NodeConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SizeGb, other.SizeGb)) 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 (SizeGb != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SizeGb); + 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 (SizeGb != 0D) { + output.WriteRawTag(9); + output.WriteDouble(SizeGb); + } + 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 (SizeGb != 0D) { + output.WriteRawTag(9); + output.WriteDouble(SizeGb); + } + 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 (SizeGb != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NodeConfig other) { + if (other == null) { + return; + } + if (other.SizeGb != 0D) { + SizeGb = other.SizeGb; + } + _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 9: { + SizeGb = input.ReadDouble(); + 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 9: { + SizeGb = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + /// + /// Zone distribution configuration for allocation of instance resources. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ZoneDistributionConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ZoneDistributionConfig()); + 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.Memorystore.V1.MemorystoreReflection.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 ZoneDistributionConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ZoneDistributionConfig(ZoneDistributionConfig other) : this() { + zone_ = other.zone_; + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ZoneDistributionConfig Clone() { + return new ZoneDistributionConfig(this); + } + + /// Field number for the "zone" field. + public const int ZoneFieldNumber = 2; + private string zone_ = ""; + /// + /// Optional. Defines zone where all resources will be allocated with + /// SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Zone { + get { return zone_; } + set { + zone_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode mode_ = global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified; + /// + /// Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ZoneDistributionConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ZoneDistributionConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Zone != other.Zone) return false; + if (Mode != other.Mode) 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 (Zone.Length != 0) hash ^= Zone.GetHashCode(); + if (Mode != global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) hash ^= Mode.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 (Mode != global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (Zone.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Zone); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (Zone.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Zone); + } + 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 (Zone.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Zone); + } + if (Mode != global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ZoneDistributionConfig other) { + if (other == null) { + return; + } + if (other.Zone.Length != 0) { + Zone = other.Zone; + } + if (other.Mode != global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + Mode = other.Mode; + } + _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: { + Mode = (global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode) input.ReadEnum(); + break; + } + case 18: { + Zone = 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: { + Mode = (global::Google.Cloud.Memorystore.V1.ZoneDistributionConfig.Types.ZoneDistributionMode) input.ReadEnum(); + break; + } + case 18: { + Zone = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ZoneDistributionConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible zone distribution modes. + /// + public enum ZoneDistributionMode { + /// + /// Not Set. Default: MULTI_ZONE + /// + [pbr::OriginalName("ZONE_DISTRIBUTION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Distribute resources across 3 zones picked at random within the + /// region. + /// + [pbr::OriginalName("MULTI_ZONE")] MultiZone = 1, + /// + /// Provision resources in a single zone. Zone field must be specified. + /// + [pbr::OriginalName("SINGLE_ZONE")] SingleZone = 2, + } + + } + #endregion + + } + + /// + /// Request message for [ListInstances][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListInstancesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListInstancesRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 ListInstancesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesRequest(ListInstancesRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesRequest Clone() { + return new ListInstancesRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Requested page size. Server may return fewer items than + /// requested. If unspecified, server will pick an appropriate default. + /// + [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_ = ""; + /// + /// Optional. A token identifying a page of results the server should return. + /// + [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_ = ""; + /// + /// Optional. Expression for filtering results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Optional. Sort results by a defined order. Supported values: "name", + /// "create_time". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = 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 ListInstancesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListInstancesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) 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 (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + 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 (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + 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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + 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 (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + 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 (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + 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 (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListInstancesRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + _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: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = 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: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Response message for [ListInstances][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListInstancesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListInstancesResponse()); + 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.Memorystore.V1.MemorystoreReflection.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 ListInstancesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesResponse(ListInstancesResponse other) : this() { + instances_ = other.instances_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesResponse Clone() { + return new ListInstancesResponse(this); + } + + /// Field number for the "instances" field. + public const int InstancesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_instances_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1.Instance.Parser); + private readonly pbc::RepeatedField instances_ = new pbc::RepeatedField(); + /// + /// If the {location} requested was "-" the response contains a list of + /// instances from all locations. Instances in unreachable locations will be + /// omitted. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Instances { + get { return instances_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListInstancesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListInstancesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!instances_.Equals(other.instances_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) 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 ^= instances_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.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 + instances_.WriteTo(output, _repeated_instances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_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) { + instances_.WriteTo(ref output, _repeated_instances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_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 += instances_.CalculateSize(_repeated_instances_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListInstancesResponse other) { + if (other == null) { + return; + } + instances_.Add(other.instances_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _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: { + instances_.AddEntriesFrom(input, _repeated_instances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_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: { + instances_.AddEntriesFrom(ref input, _repeated_instances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [GetInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetInstanceRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 GetInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetInstanceRequest(GetInstanceRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetInstanceRequest Clone() { + return new GetInstanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 GetInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetInstanceRequest 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(GetInstanceRequest 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 + + } + + /// + /// Request message for [CreateInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateInstanceRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 CreateInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateInstanceRequest(CreateInstanceRequest other) : this() { + parent_ = other.parent_; + instanceId_ = other.instanceId_; + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateInstanceRequest Clone() { + return new CreateInstanceRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "instance_id" field. + public const int InstanceIdFieldNumber = 2; + private string instanceId_ = ""; + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InstanceId { + get { return instanceId_; } + set { + instanceId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 3; + private global::Google.Cloud.Memorystore.V1.Instance instance_; + /// + /// Required. The instance to create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 CreateInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (InstanceId != other.InstanceId) return false; + if (!object.Equals(Instance, other.Instance)) return false; + if (RequestId != other.RequestId) 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 (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (InstanceId.Length != 0) hash ^= InstanceId.GetHashCode(); + if (instance_ != null) hash ^= Instance.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (InstanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InstanceId); + } + if (instance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + 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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (InstanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InstanceId); + } + if (instance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + 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 (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (InstanceId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceId); + } + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateInstanceRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.InstanceId.Length != 0) { + InstanceId = other.InstanceId; + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + Instance.MergeFrom(other.Instance); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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: { + Parent = input.ReadString(); + break; + } + case 18: { + InstanceId = input.ReadString(); + break; + } + case 26: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 34: { + RequestId = 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: { + Parent = input.ReadString(); + break; + } + case 18: { + InstanceId = input.ReadString(); + break; + } + case 26: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [UpdateInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateInstanceRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 UpdateInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInstanceRequest(UpdateInstanceRequest other) : this() { + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInstanceRequest Clone() { + return new UpdateInstanceRequest(this); + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 2; + private global::Google.Cloud.Memorystore.V1.Instance instance_; + /// + /// Required. The instance to update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.Instance Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 3; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 UpdateInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + if (!object.Equals(Instance, other.Instance)) return false; + if (RequestId != other.RequestId) 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 (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (instance_ != null) hash ^= Instance.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.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 (updateMask_ != null) { + output.WriteRawTag(10); + output.WriteMessage(UpdateMask); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + 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 (updateMask_ != null) { + output.WriteRawTag(10); + output.WriteMessage(UpdateMask); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + 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 (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateInstanceRequest other) { + if (other == null) { + return; + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + Instance.MergeFrom(other.Instance); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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 (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + RequestId = 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: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [DeleteInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteInstanceRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 DeleteInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteInstanceRequest(DeleteInstanceRequest other) : this() { + name_ = other.name_; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteInstanceRequest Clone() { + return new DeleteInstanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 "request_id" field. + public const int RequestIdFieldNumber = 2; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 DeleteInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (RequestId != other.RequestId) 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 (RequestId.Length != 0) hash ^= RequestId.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 (RequestId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestId); + } + 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 (RequestId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestId); + } + 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 (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteInstanceRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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: { + RequestId = 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; + } + case 18: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [GetCertificateAuthority][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetCertificateAuthorityRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetCertificateAuthorityRequest()); + 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.Memorystore.V1.MemorystoreReflection.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 GetCertificateAuthorityRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetCertificateAuthorityRequest(GetCertificateAuthorityRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetCertificateAuthorityRequest Clone() { + return new GetCertificateAuthorityRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + [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 GetCertificateAuthorityRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetCertificateAuthorityRequest 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(GetCertificateAuthorityRequest 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 + + } + + /// + /// A certificate authority for an instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CertificateAuthority : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CertificateAuthority()); + 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.Memorystore.V1.MemorystoreReflection.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 CertificateAuthority() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertificateAuthority(CertificateAuthority other) : this() { + name_ = other.name_; + switch (other.ServerCaCase) { + case ServerCaOneofCase.ManagedServerCa: + ManagedServerCa = other.ManagedServerCa.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertificateAuthority Clone() { + return new CertificateAuthority(this); + } + + /// Field number for the "managed_server_ca" field. + public const int ManagedServerCaFieldNumber = 2; + /// + /// A managed server certificate authority. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority ManagedServerCa { + get { return serverCaCase_ == ServerCaOneofCase.ManagedServerCa ? (global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority) serverCa_ : null; } + set { + serverCa_ = value; + serverCaCase_ = value == null ? ServerCaOneofCase.None : ServerCaOneofCase.ManagedServerCa; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. Unique name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object serverCa_; + /// Enum of possible cases for the "server_ca" oneof. + public enum ServerCaOneofCase { + None = 0, + ManagedServerCa = 2, + } + private ServerCaOneofCase serverCaCase_ = ServerCaOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServerCaOneofCase ServerCaCase { + get { return serverCaCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearServerCa() { + serverCaCase_ = ServerCaOneofCase.None; + serverCa_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CertificateAuthority); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CertificateAuthority other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ManagedServerCa, other.ManagedServerCa)) return false; + if (Name != other.Name) return false; + if (ServerCaCase != other.ServerCaCase) 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) hash ^= ManagedServerCa.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= (int) serverCaCase_; + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + output.WriteRawTag(18); + output.WriteMessage(ManagedServerCa); + } + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + output.WriteRawTag(18); + output.WriteMessage(ManagedServerCa); + } + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ManagedServerCa); + } + 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(CertificateAuthority other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + switch (other.ServerCaCase) { + case ServerCaOneofCase.ManagedServerCa: + if (ManagedServerCa == null) { + ManagedServerCa = new global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority(); + } + ManagedServerCa.MergeFrom(other.ManagedServerCa); + 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: { + Name = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority subBuilder = new global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority(); + if (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + subBuilder.MergeFrom(ManagedServerCa); + } + input.ReadMessage(subBuilder); + ManagedServerCa = 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: { + Name = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority subBuilder = new global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority(); + if (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + subBuilder.MergeFrom(ManagedServerCa); + } + input.ReadMessage(subBuilder); + ManagedServerCa = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CertificateAuthority message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A managed certificate authority. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ManagedCertificateAuthority : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedCertificateAuthority()); + 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.Memorystore.V1.CertificateAuthority.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 ManagedCertificateAuthority() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCertificateAuthority(ManagedCertificateAuthority other) : this() { + caCerts_ = other.caCerts_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCertificateAuthority Clone() { + return new ManagedCertificateAuthority(this); + } + + /// Field number for the "ca_certs" field. + public const int CaCertsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_caCerts_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain.Parser); + private readonly pbc::RepeatedField caCerts_ = new pbc::RepeatedField(); + /// + /// PEM encoded CA certificate chains for managed server authentication. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField CaCerts { + get { return caCerts_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ManagedCertificateAuthority); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ManagedCertificateAuthority other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!caCerts_.Equals(other.caCerts_)) 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 ^= caCerts_.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 + caCerts_.WriteTo(output, _repeated_caCerts_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) { + caCerts_.WriteTo(ref output, _repeated_caCerts_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 += caCerts_.CalculateSize(_repeated_caCerts_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ManagedCertificateAuthority other) { + if (other == null) { + return; + } + caCerts_.Add(other.caCerts_); + _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: { + caCerts_.AddEntriesFrom(input, _repeated_caCerts_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: { + caCerts_.AddEntriesFrom(ref input, _repeated_caCerts_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ManagedCertificateAuthority message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A certificate chain. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CertChain : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CertChain()); + 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.Memorystore.V1.CertificateAuthority.Types.ManagedCertificateAuthority.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 CertChain() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertChain(CertChain other) : this() { + certificates_ = other.certificates_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertChain Clone() { + return new CertChain(this); + } + + /// Field number for the "certificates" field. + public const int CertificatesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_certificates_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField certificates_ = new pbc::RepeatedField(); + /// + /// The certificates that form the CA chain in order of leaf to root. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Certificates { + get { return certificates_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CertChain); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CertChain other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!certificates_.Equals(other.certificates_)) 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 ^= certificates_.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 + certificates_.WriteTo(output, _repeated_certificates_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) { + certificates_.WriteTo(ref output, _repeated_certificates_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 += certificates_.CalculateSize(_repeated_certificates_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CertChain other) { + if (other == null) { + return; + } + certificates_.Add(other.certificates_); + _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: { + certificates_.AddEntriesFrom(input, _repeated_certificates_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: { + certificates_.AddEntriesFrom(ref input, _repeated_certificates_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + } + #endregion + + } + + /// + /// Represents the metadata of a long-running operation. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OperationMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OperationMetadata()); + 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.Memorystore.V1.MemorystoreReflection.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 OperationMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata(OperationMetadata other) : this() { + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + endTime_ = other.endTime_ != null ? other.endTime_.Clone() : null; + target_ = other.target_; + verb_ = other.verb_; + statusMessage_ = other.statusMessage_; + requestedCancellation_ = other.requestedCancellation_; + apiVersion_ = other.apiVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata Clone() { + return new OperationMetadata(this); + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. The time the operation was 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 "end_time" field. + public const int EndTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp endTime_; + /// + /// Output only. The time the operation finished running. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp EndTime { + get { return endTime_; } + set { + endTime_ = value; + } + } + + /// Field number for the "target" field. + public const int TargetFieldNumber = 3; + private string target_ = ""; + /// + /// Output only. Server-defined resource path for the target of the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Target { + get { return target_; } + set { + target_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verb" field. + public const int VerbFieldNumber = 4; + private string verb_ = ""; + /// + /// Output only. Name of the verb executed by the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Verb { + get { return verb_; } + set { + verb_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status_message" field. + public const int StatusMessageFieldNumber = 5; + private string statusMessage_ = ""; + /// + /// Output only. Human-readable status of the operation, if any. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StatusMessage { + get { return statusMessage_; } + set { + statusMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "requested_cancellation" field. + public const int RequestedCancellationFieldNumber = 6; + private bool requestedCancellation_; + /// + /// Output only. Identifies whether the user has requested cancellation + /// of the operation. Operations that have been cancelled successfully + /// have [Operation.error][] value with a + /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + /// `Code.CANCELLED`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RequestedCancellation { + get { return requestedCancellation_; } + set { + requestedCancellation_ = value; + } + } + + /// Field number for the "api_version" field. + public const int ApiVersionFieldNumber = 7; + private string apiVersion_ = ""; + /// + /// Output only. API version used to start the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ApiVersion { + get { return apiVersion_; } + set { + apiVersion_ = 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 OperationMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OperationMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(EndTime, other.EndTime)) return false; + if (Target != other.Target) return false; + if (Verb != other.Verb) return false; + if (StatusMessage != other.StatusMessage) return false; + if (RequestedCancellation != other.RequestedCancellation) return false; + if (ApiVersion != other.ApiVersion) 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 (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (endTime_ != null) hash ^= EndTime.GetHashCode(); + if (Target.Length != 0) hash ^= Target.GetHashCode(); + if (Verb.Length != 0) hash ^= Verb.GetHashCode(); + if (StatusMessage.Length != 0) hash ^= StatusMessage.GetHashCode(); + if (RequestedCancellation != false) hash ^= RequestedCancellation.GetHashCode(); + if (ApiVersion.Length != 0) hash ^= ApiVersion.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 (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + 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 (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + 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 (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (endTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EndTime); + } + if (Target.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Target); + } + if (Verb.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Verb); + } + if (StatusMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StatusMessage); + } + if (RequestedCancellation != false) { + size += 1 + 1; + } + if (ApiVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ApiVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OperationMetadata other) { + if (other == null) { + return; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.endTime_ != null) { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + EndTime.MergeFrom(other.EndTime); + } + if (other.Target.Length != 0) { + Target = other.Target; + } + if (other.Verb.Length != 0) { + Verb = other.Verb; + } + if (other.StatusMessage.Length != 0) { + StatusMessage = other.StatusMessage; + } + if (other.RequestedCancellation != false) { + RequestedCancellation = other.RequestedCancellation; + } + if (other.ApiVersion.Length != 0) { + ApiVersion = other.ApiVersion; + } + _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 (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = 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: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreClient.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreClient.g.cs new file mode 100644 index 000000000000..06c22716eeda --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreClient.g.cs @@ -0,0 +1,1507 @@ +// Copyright 2025 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 gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using lro = Google.LongRunning; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; +using wkt = Google.Protobuf.WellKnownTypes; + +namespace Google.Cloud.Memorystore.V1 +{ + /// Settings for instances. + public sealed partial class MemorystoreSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static MemorystoreSettings GetDefault() => new MemorystoreSettings(); + + /// Constructs a new object with default settings. + public MemorystoreSettings() + { + } + + private MemorystoreSettings(MemorystoreSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + ListInstancesSettings = existing.ListInstancesSettings; + GetInstanceSettings = existing.GetInstanceSettings; + CreateInstanceSettings = existing.CreateInstanceSettings; + CreateInstanceOperationsSettings = existing.CreateInstanceOperationsSettings.Clone(); + UpdateInstanceSettings = existing.UpdateInstanceSettings; + UpdateInstanceOperationsSettings = existing.UpdateInstanceOperationsSettings.Clone(); + DeleteInstanceSettings = existing.DeleteInstanceSettings; + DeleteInstanceOperationsSettings = existing.DeleteInstanceOperationsSettings.Clone(); + GetCertificateAuthoritySettings = existing.GetCertificateAuthoritySettings; + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(MemorystoreSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.ListInstances and MemorystoreClient.ListInstancesAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListInstancesSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.GetInstance and MemorystoreClient.GetInstanceAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetInstanceSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.CreateInstance and MemorystoreClient.CreateInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings CreateInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.CreateInstance and + /// MemorystoreClient.CreateInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings CreateInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.UpdateInstance and MemorystoreClient.UpdateInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings UpdateInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.UpdateInstance and + /// MemorystoreClient.UpdateInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings UpdateInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.DeleteInstance and MemorystoreClient.DeleteInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.DeleteInstance and + /// MemorystoreClient.DeleteInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings DeleteInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.GetCertificateAuthority and MemorystoreClient.GetCertificateAuthorityAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetCertificateAuthoritySettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// The settings to use for the associated with the client. + /// + public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault(); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public MemorystoreSettings Clone() => new MemorystoreSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class MemorystoreClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public MemorystoreSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public MemorystoreClientBuilder() : base(MemorystoreClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref MemorystoreClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override MemorystoreClient Build() + { + MemorystoreClient 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 MemorystoreClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return MemorystoreClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return MemorystoreClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => MemorystoreClient.ChannelPool; + } + + /// Memorystore client wrapper, for convenient use. + /// + /// Service describing handlers for resources + /// + public abstract partial class MemorystoreClient + { + /// + /// The default endpoint for the Memorystore service, which is a host of "memorystore.googleapis.com" and a port + /// of 443. + /// + public static string DefaultEndpoint { get; } = "memorystore.googleapis.com:443"; + + /// The default Memorystore scopes. + /// + /// The default Memorystore scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(Memorystore.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Rest, 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 MemorystoreClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static MemorystoreClient Create() => new MemorystoreClientBuilder().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 MemorystoreClient Create(grpccore::CallInvoker callInvoker, MemorystoreSettings 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); + } + Memorystore.MemorystoreClient grpcClient = new Memorystore.MemorystoreClient(callInvoker); + return new MemorystoreClientImpl(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 Memorystore client + public virtual Memorystore.MemorystoreClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstances(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstances(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstancesAsync(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstances(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstances(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstancesAsync(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstancesAsync(request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 Instance GetInstance(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, st::CancellationToken cancellationToken) => + GetInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Instance GetInstance(string name, gaxgrpc::CallSettings callSettings = null) => + GetInstance(new GetInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetInstanceAsync(new GetInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(string name, st::CancellationToken cancellationToken) => + GetInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Instance GetInstance(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetInstance(new GetInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetInstanceAsync(new GetInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(InstanceName name, st::CancellationToken cancellationToken) => + GetInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 lro::Operation CreateInstance(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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> CreateInstanceAsync(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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> CreateInstanceAsync(CreateInstanceRequest request, st::CancellationToken cancellationToken) => + CreateInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for CreateInstance. + public virtual lro::OperationsClient CreateInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of CreateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceCreateInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// CreateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceCreateInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateInstanceOperationsClient, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateInstance(string parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstance(new CreateInstanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(string parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstanceAsync(new CreateInstanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(string parent, Instance instance, string instanceId, st::CancellationToken cancellationToken) => + CreateInstanceAsync(parent, instance, instanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateInstance(gagr::LocationName parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstance(new CreateInstanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(gagr::LocationName parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstanceAsync(new CreateInstanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(gagr::LocationName parent, Instance instance, string instanceId, st::CancellationToken cancellationToken) => + CreateInstanceAsync(parent, instance, instanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 lro::Operation UpdateInstance(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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> UpdateInstanceAsync(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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> UpdateInstanceAsync(UpdateInstanceRequest request, st::CancellationToken cancellationToken) => + UpdateInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for UpdateInstance. + public virtual lro::OperationsClient UpdateInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of UpdateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceUpdateInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), UpdateInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// UpdateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceUpdateInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), UpdateInstanceOperationsClient, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation UpdateInstance(Instance instance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateInstance(new UpdateInstanceRequest + { + UpdateMask = updateMask, + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> UpdateInstanceAsync(Instance instance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateInstanceAsync(new UpdateInstanceRequest + { + UpdateMask = updateMask, + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> UpdateInstanceAsync(Instance instance, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateInstanceAsync(instance, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes a single Instance. + /// + /// 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 lro::Operation DeleteInstance(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes a single Instance. + /// + /// 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> DeleteInstanceAsync(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes a single Instance. + /// + /// 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> DeleteInstanceAsync(DeleteInstanceRequest request, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for DeleteInstance. + public virtual lro::OperationsClient DeleteInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of DeleteInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceDeleteInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// DeleteInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceDeleteInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteInstanceOperationsClient, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteInstance(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstance(new DeleteInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstanceAsync(new DeleteInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(string name, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteInstance(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstance(new DeleteInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstanceAsync(new DeleteInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(InstanceName name, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 CertificateAuthority GetCertificateAuthority(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CertificateAuthority GetCertificateAuthority(string name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthority(new GetCertificateAuthorityRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthorityAsync(new GetCertificateAuthorityRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(string name, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CertificateAuthority GetCertificateAuthority(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthority(new GetCertificateAuthorityRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthorityAsync(new GetCertificateAuthorityRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(InstanceName name, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + } + + /// Memorystore client wrapper implementation, for convenient use. + /// + /// Service describing handlers for resources + /// + public sealed partial class MemorystoreClientImpl : MemorystoreClient + { + private readonly gaxgrpc::ApiCall _callListInstances; + + private readonly gaxgrpc::ApiCall _callGetInstance; + + private readonly gaxgrpc::ApiCall _callCreateInstance; + + private readonly gaxgrpc::ApiCall _callUpdateInstance; + + private readonly gaxgrpc::ApiCall _callDeleteInstance; + + private readonly gaxgrpc::ApiCall _callGetCertificateAuthority; + + /// + /// Constructs a client wrapper for the Memorystore 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 MemorystoreClientImpl(Memorystore.MemorystoreClient grpcClient, MemorystoreSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + MemorystoreSettings effectiveSettings = settings ?? MemorystoreSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + CreateInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateInstanceOperationsSettings, logger); + UpdateInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateInstanceOperationsSettings, logger); + DeleteInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteInstanceOperationsSettings, logger); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callListInstances = clientHelper.BuildApiCall("ListInstances", grpcClient.ListInstancesAsync, grpcClient.ListInstances, effectiveSettings.ListInstancesSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListInstances); + Modify_ListInstancesApiCall(ref _callListInstances); + _callGetInstance = clientHelper.BuildApiCall("GetInstance", grpcClient.GetInstanceAsync, grpcClient.GetInstance, effectiveSettings.GetInstanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetInstance); + Modify_GetInstanceApiCall(ref _callGetInstance); + _callCreateInstance = clientHelper.BuildApiCall("CreateInstance", grpcClient.CreateInstanceAsync, grpcClient.CreateInstance, effectiveSettings.CreateInstanceSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callCreateInstance); + Modify_CreateInstanceApiCall(ref _callCreateInstance); + _callUpdateInstance = clientHelper.BuildApiCall("UpdateInstance", grpcClient.UpdateInstanceAsync, grpcClient.UpdateInstance, effectiveSettings.UpdateInstanceSettings).WithGoogleRequestParam("instance.name", request => request.Instance?.Name); + Modify_ApiCall(ref _callUpdateInstance); + Modify_UpdateInstanceApiCall(ref _callUpdateInstance); + _callDeleteInstance = clientHelper.BuildApiCall("DeleteInstance", grpcClient.DeleteInstanceAsync, grpcClient.DeleteInstance, effectiveSettings.DeleteInstanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteInstance); + Modify_DeleteInstanceApiCall(ref _callDeleteInstance); + _callGetCertificateAuthority = clientHelper.BuildApiCall("GetCertificateAuthority", grpcClient.GetCertificateAuthorityAsync, grpcClient.GetCertificateAuthority, effectiveSettings.GetCertificateAuthoritySettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetCertificateAuthority); + Modify_GetCertificateAuthorityApiCall(ref _callGetCertificateAuthority); + 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_ListInstancesApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CreateInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetCertificateAuthorityApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(Memorystore.MemorystoreClient grpcClient, MemorystoreSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC Memorystore client + public override Memorystore.MemorystoreClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_ListInstancesRequest(ref ListInstancesRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetInstanceRequest(ref GetInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CreateInstanceRequest(ref CreateInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateInstanceRequest(ref UpdateInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteInstanceRequest(ref DeleteInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetCertificateAuthorityRequest(ref GetCertificateAuthorityRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListInstancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListInstances, request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListInstancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListInstances, request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 Instance GetInstance(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetInstanceRequest(ref request, ref callSettings); + return _callGetInstance.Sync(request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetInstanceRequest(ref request, ref callSettings); + return _callGetInstance.Async(request, callSettings); + } + + /// The long-running operations client for CreateInstance. + public override lro::OperationsClient CreateInstanceOperationsClient { get; } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 lro::Operation CreateInstance(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callCreateInstance.Sync(request, callSettings), CreateInstanceOperationsClient); + } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 async stt::Task> CreateInstanceAsync(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callCreateInstance.Async(request, callSettings).ConfigureAwait(false), CreateInstanceOperationsClient); + } + + /// The long-running operations client for UpdateInstance. + public override lro::OperationsClient UpdateInstanceOperationsClient { get; } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 lro::Operation UpdateInstance(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callUpdateInstance.Sync(request, callSettings), UpdateInstanceOperationsClient); + } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 async stt::Task> UpdateInstanceAsync(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callUpdateInstance.Async(request, callSettings).ConfigureAwait(false), UpdateInstanceOperationsClient); + } + + /// The long-running operations client for DeleteInstance. + public override lro::OperationsClient DeleteInstanceOperationsClient { get; } + + /// + /// Deletes a single Instance. + /// + /// 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 lro::Operation DeleteInstance(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callDeleteInstance.Sync(request, callSettings), DeleteInstanceOperationsClient); + } + + /// + /// Deletes a single Instance. + /// + /// 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 async stt::Task> DeleteInstanceAsync(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callDeleteInstance.Async(request, callSettings).ConfigureAwait(false), DeleteInstanceOperationsClient); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 CertificateAuthority GetCertificateAuthority(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetCertificateAuthorityRequest(ref request, ref callSettings); + return _callGetCertificateAuthority.Sync(request, callSettings); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetCertificateAuthorityRequest(ref request, ref callSettings); + return _callGetCertificateAuthority.Async(request, callSettings); + } + } + + public partial class ListInstancesRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListInstancesResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Instances.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public static partial class Memorystore + { + public partial class MemorystoreClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// A new Operations client for the same target as this client. + public virtual lro::Operations.OperationsClient CreateOperationsClient() => + new lro::Operations.OperationsClient(CallInvoker); + } + } + + public static partial class Memorystore + { + public partial class MemorystoreClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// + /// A new for the same target as this client. + /// + public virtual gcl::Locations.LocationsClient CreateLocationsClient() => + new gcl::Locations.LocationsClient(CallInvoker); + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreGrpc.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreGrpc.g.cs new file mode 100644 index 000000000000..18b03094e103 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreGrpc.g.cs @@ -0,0 +1,573 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/memorystore/v1/memorystore.proto +// +// Original file comments: +// 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 +// +// 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.Memorystore.V1 { + /// + /// Service describing handlers for resources + /// + public static partial class Memorystore + { + static readonly string __ServiceName = "google.cloud.memorystore.v1.Memorystore"; + + [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_cloud_memorystore_v1_ListInstancesRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.ListInstancesRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_ListInstancesResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.ListInstancesResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_GetInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.GetInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_Instance = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.Instance.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_CreateInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.CreateInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_UpdateInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_DeleteInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_GetCertificateAuthorityRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1_CertificateAuthority = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1.CertificateAuthority.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListInstances = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListInstances", + __Marshaller_google_cloud_memorystore_v1_ListInstancesRequest, + __Marshaller_google_cloud_memorystore_v1_ListInstancesResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetInstance", + __Marshaller_google_cloud_memorystore_v1_GetInstanceRequest, + __Marshaller_google_cloud_memorystore_v1_Instance); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateInstance", + __Marshaller_google_cloud_memorystore_v1_CreateInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateInstance", + __Marshaller_google_cloud_memorystore_v1_UpdateInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteInstance", + __Marshaller_google_cloud_memorystore_v1_DeleteInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetCertificateAuthority = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetCertificateAuthority", + __Marshaller_google_cloud_memorystore_v1_GetCertificateAuthorityRequest, + __Marshaller_google_cloud_memorystore_v1_CertificateAuthority); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Memorystore.V1.MemorystoreReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of Memorystore + [grpc::BindServiceMethod(typeof(Memorystore), "BindService")] + public abstract partial class MemorystoreBase + { + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(global::Google.Cloud.Memorystore.V1.ListInstancesRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstance(global::Google.Cloud.Memorystore.V1.GetInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstance(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstance(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstance(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthority(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for Memorystore + public partial class MemorystoreClient : grpc::ClientBase + { + /// Creates a new client for Memorystore + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public MemorystoreClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for Memorystore that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public MemorystoreClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected MemorystoreClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected MemorystoreClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Lists Instances in a given project and location. + /// + /// 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.Memorystore.V1.ListInstancesResponse ListInstances(global::Google.Cloud.Memorystore.V1.ListInstancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListInstances(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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.Memorystore.V1.ListInstancesResponse ListInstances(global::Google.Cloud.Memorystore.V1.ListInstancesRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListInstances, null, options, request); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(global::Google.Cloud.Memorystore.V1.ListInstancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListInstancesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(global::Google.Cloud.Memorystore.V1.ListInstancesRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListInstances, null, options, request); + } + /// + /// Gets details of a single Instance. + /// + /// 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.Memorystore.V1.Instance GetInstance(global::Google.Cloud.Memorystore.V1.GetInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details of a single Instance. + /// + /// 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.Memorystore.V1.Instance GetInstance(global::Google.Cloud.Memorystore.V1.GetInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetInstance, null, options, request); + } + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(global::Google.Cloud.Memorystore.V1.GetInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(global::Google.Cloud.Memorystore.V1.GetInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetInstance, null, options, request); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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.LongRunning.Operation CreateInstance(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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.LongRunning.Operation CreateInstance(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateInstance, null, options, request); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstanceAsync(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstanceAsync(global::Google.Cloud.Memorystore.V1.CreateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateInstance, null, options, request); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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.LongRunning.Operation UpdateInstance(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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.LongRunning.Operation UpdateInstance(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateInstance, null, options, request); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstanceAsync(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstanceAsync(global::Google.Cloud.Memorystore.V1.UpdateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateInstance, null, options, request); + } + /// + /// Deletes a single Instance. + /// + /// 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.LongRunning.Operation DeleteInstance(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes a single Instance. + /// + /// 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.LongRunning.Operation DeleteInstance(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteInstance, null, options, request); + } + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstanceAsync(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstanceAsync(global::Google.Cloud.Memorystore.V1.DeleteInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteInstance, null, options, request); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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.Memorystore.V1.CertificateAuthority GetCertificateAuthority(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetCertificateAuthority(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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.Memorystore.V1.CertificateAuthority GetCertificateAuthority(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetCertificateAuthority, null, options, request); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetCertificateAuthorityAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(global::Google.Cloud.Memorystore.V1.GetCertificateAuthorityRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetCertificateAuthority, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override MemorystoreClient NewInstance(ClientBaseConfiguration configuration) + { + return new MemorystoreClient(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(MemorystoreBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_ListInstances, serviceImpl.ListInstances) + .AddMethod(__Method_GetInstance, serviceImpl.GetInstance) + .AddMethod(__Method_CreateInstance, serviceImpl.CreateInstance) + .AddMethod(__Method_UpdateInstance, serviceImpl.UpdateInstance) + .AddMethod(__Method_DeleteInstance, serviceImpl.DeleteInstance) + .AddMethod(__Method_GetCertificateAuthority, serviceImpl.GetCertificateAuthority).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, MemorystoreBase serviceImpl) + { + serviceBinder.AddMethod(__Method_ListInstances, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListInstances)); + serviceBinder.AddMethod(__Method_GetInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetInstance)); + serviceBinder.AddMethod(__Method_CreateInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateInstance)); + serviceBinder.AddMethod(__Method_UpdateInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateInstance)); + serviceBinder.AddMethod(__Method_DeleteInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteInstance)); + serviceBinder.AddMethod(__Method_GetCertificateAuthority, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetCertificateAuthority)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreResourceNames.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreResourceNames.g.cs new file mode 100644 index 000000000000..abdc46b7fba8 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/MemorystoreResourceNames.g.cs @@ -0,0 +1,1436 @@ +// Copyright 2025 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 gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gcmv = Google.Cloud.Memorystore.V1; +using sys = System; + +namespace Google.Cloud.Memorystore.V1 +{ + /// Resource name for the Instance resource. + public sealed partial class InstanceName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/instances/{instance}. + /// + ProjectLocationInstance = 1, + } + + private static gax::PathTemplate s_projectLocationInstance = new gax::PathTemplate("projects/{project}/locations/{location}/instances/{instance}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static InstanceName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new InstanceName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static InstanceName FromProjectLocationInstance(string projectId, string locationId, string instanceId) => + new InstanceName(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + public static string Format(string projectId, string locationId, string instanceId) => + FormatProjectLocationInstance(projectId, locationId, instanceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + public static string FormatProjectLocationInstance(string projectId, string locationId, string instanceId) => + s_projectLocationInstance.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// 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}/locations/{location}/instances/{instance} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static InstanceName Parse(string instanceName) => Parse(instanceName, 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}/locations/{location}/instances/{instance} + /// + /// 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 InstanceName Parse(string instanceName, bool allowUnparsed) => + TryParse(instanceName, allowUnparsed, out InstanceName 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}/locations/{location}/instances/{instance} + /// + /// + /// 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 instanceName, out InstanceName result) => TryParse(instanceName, 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}/locations/{location}/instances/{instance} + /// + /// 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 instanceName, bool allowUnparsed, out InstanceName result) + { + gax::GaxPreconditions.CheckNotNull(instanceName, nameof(instanceName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationInstance.TryParseName(instanceName, out resourceName)) + { + result = FromProjectLocationInstance(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(instanceName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private InstanceName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string instanceId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + InstanceId = instanceId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/instances/{instance} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + public InstanceName(string projectId, string locationId, string instanceId) : this(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))) + { + } + + /// 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 Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { 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.ProjectLocationInstance: return s_projectLocationInstance.Expand(ProjectId, LocationId, InstanceId); + 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 InstanceName); + + /// + public bool Equals(InstanceName 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 ==(InstanceName a, InstanceName 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 !=(InstanceName a, InstanceName b) => !(a == b); + } + + /// Resource name for the CertificateAuthority resource. + public sealed partial class CertificateAuthorityName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + ProjectLocationInstance = 1, + } + + private static gax::PathTemplate s_projectLocationInstance = new gax::PathTemplate("projects/{project}/locations/{location}/instances/{instance}/certificateAuthority"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static CertificateAuthorityName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new CertificateAuthorityName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// A new instance of constructed from the provided ids. + /// + public static CertificateAuthorityName FromProjectLocationInstance(string projectId, string locationId, string instanceId) => + new CertificateAuthorityName(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + public static string Format(string projectId, string locationId, string instanceId) => + FormatProjectLocationInstance(projectId, locationId, instanceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + public static string FormatProjectLocationInstance(string projectId, string locationId, string instanceId) => + s_projectLocationInstance.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static CertificateAuthorityName Parse(string certificateAuthorityName) => + Parse(certificateAuthorityName, 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// 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 CertificateAuthorityName Parse(string certificateAuthorityName, bool allowUnparsed) => + TryParse(certificateAuthorityName, allowUnparsed, out CertificateAuthorityName 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// + /// 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 certificateAuthorityName, out CertificateAuthorityName result) => + TryParse(certificateAuthorityName, 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// 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 certificateAuthorityName, bool allowUnparsed, out CertificateAuthorityName result) + { + gax::GaxPreconditions.CheckNotNull(certificateAuthorityName, nameof(certificateAuthorityName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationInstance.TryParseName(certificateAuthorityName, out resourceName)) + { + result = FromProjectLocationInstance(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(certificateAuthorityName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private CertificateAuthorityName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string instanceId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + InstanceId = instanceId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of + /// pattern projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + public CertificateAuthorityName(string projectId, string locationId, string instanceId) : this(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))) + { + } + + /// 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 Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { 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.ProjectLocationInstance: return s_projectLocationInstance.Expand(ProjectId, LocationId, InstanceId); + 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 CertificateAuthorityName); + + /// + public bool Equals(CertificateAuthorityName 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 ==(CertificateAuthorityName a, CertificateAuthorityName 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 !=(CertificateAuthorityName a, CertificateAuthorityName b) => !(a == b); + } + + /// Resource name for the ForwardingRule resource. + public sealed partial class ForwardingRuleName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// . + /// + ProjectRegionForwardingRule = 1, + } + + private static gax::PathTemplate s_projectRegionForwardingRule = new gax::PathTemplate("projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ForwardingRuleName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ForwardingRuleName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ForwardingRuleName FromProjectRegionForwardingRule(string projectId, string regionId, string forwardingRuleId) => + new ForwardingRuleName(ResourceNameType.ProjectRegionForwardingRule, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), forwardingRuleId: gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + public static string Format(string projectId, string regionId, string forwardingRuleId) => + FormatProjectRegionForwardingRule(projectId, regionId, forwardingRuleId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + public static string FormatProjectRegionForwardingRule(string projectId, string regionId, string forwardingRuleId) => + s_projectRegionForwardingRule.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))); + + /// + /// 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ForwardingRuleName Parse(string forwardingRuleName) => Parse(forwardingRuleName, 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// 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 ForwardingRuleName Parse(string forwardingRuleName, bool allowUnparsed) => + TryParse(forwardingRuleName, allowUnparsed, out ForwardingRuleName 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// + /// 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 forwardingRuleName, out ForwardingRuleName result) => + TryParse(forwardingRuleName, 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// 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 forwardingRuleName, bool allowUnparsed, out ForwardingRuleName result) + { + gax::GaxPreconditions.CheckNotNull(forwardingRuleName, nameof(forwardingRuleName)); + gax::TemplatedResourceName resourceName; + if (s_projectRegionForwardingRule.TryParseName(forwardingRuleName, out resourceName)) + { + result = FromProjectRegionForwardingRule(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(forwardingRuleName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ForwardingRuleName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string forwardingRuleId = null, string projectId = null, string regionId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ForwardingRuleId = forwardingRuleId; + ProjectId = projectId; + RegionId = regionId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + public ForwardingRuleName(string projectId, string regionId, string forwardingRuleId) : this(ResourceNameType.ProjectRegionForwardingRule, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), forwardingRuleId: gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))) + { + } + + /// 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 ForwardingRule ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ForwardingRuleId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The Region ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string RegionId { 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.ProjectRegionForwardingRule: return s_projectRegionForwardingRule.Expand(ProjectId, RegionId, ForwardingRuleId); + 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 ForwardingRuleName); + + /// + public bool Equals(ForwardingRuleName 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 ==(ForwardingRuleName a, ForwardingRuleName 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 !=(ForwardingRuleName a, ForwardingRuleName b) => !(a == b); + } + + /// Resource name for the Network resource. + public sealed partial class NetworkName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// A resource name with pattern projects/{project}/global/networks/{network}. + ProjectNetwork = 1, + } + + private static gax::PathTemplate s_projectNetwork = new gax::PathTemplate("projects/{project}/global/networks/{network}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static NetworkName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new NetworkName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static NetworkName FromProjectNetwork(string projectId, string networkId) => + new NetworkName(ResourceNameType.ProjectNetwork, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), networkId: gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + public static string Format(string projectId, string networkId) => FormatProjectNetwork(projectId, networkId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + public static string FormatProjectNetwork(string projectId, string networkId) => + s_projectNetwork.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))); + + /// 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}/global/networks/{network} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static NetworkName Parse(string networkName) => Parse(networkName, 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}/global/networks/{network} + /// + /// 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 NetworkName Parse(string networkName, bool allowUnparsed) => + TryParse(networkName, allowUnparsed, out NetworkName 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}/global/networks/{network} + /// + /// + /// 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 networkName, out NetworkName result) => TryParse(networkName, 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}/global/networks/{network} + /// + /// 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 networkName, bool allowUnparsed, out NetworkName result) + { + gax::GaxPreconditions.CheckNotNull(networkName, nameof(networkName)); + gax::TemplatedResourceName resourceName; + if (s_projectNetwork.TryParseName(networkName, out resourceName)) + { + result = FromProjectNetwork(resourceName[0], resourceName[1]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(networkName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private NetworkName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string networkId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + NetworkId = networkId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/global/networks/{network} + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + public NetworkName(string projectId, string networkId) : this(ResourceNameType.ProjectNetwork, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), networkId: gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))) + { + } + + /// 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 Network ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string NetworkId { 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.ProjectNetwork: return s_projectNetwork.Expand(ProjectId, NetworkId); + 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 NetworkName); + + /// + public bool Equals(NetworkName 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 ==(NetworkName a, NetworkName 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 !=(NetworkName a, NetworkName b) => !(a == b); + } + + /// Resource name for the ServiceAttachment resource. + public sealed partial class ServiceAttachmentName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + ProjectRegionServiceAttachment = 1, + } + + private static gax::PathTemplate s_projectRegionServiceAttachment = new gax::PathTemplate("projects/{project}/regions/{region}/serviceAttachments/{service_attachment}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ServiceAttachmentName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ServiceAttachmentName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ServiceAttachmentName FromProjectRegionServiceAttachment(string projectId, string regionId, string serviceAttachmentId) => + new ServiceAttachmentName(ResourceNameType.ProjectRegionServiceAttachment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), serviceAttachmentId: gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + public static string Format(string projectId, string regionId, string serviceAttachmentId) => + FormatProjectRegionServiceAttachment(projectId, regionId, serviceAttachmentId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + public static string FormatProjectRegionServiceAttachment(string projectId, string regionId, string serviceAttachmentId) => + s_projectRegionServiceAttachment.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))); + + /// + /// 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ServiceAttachmentName Parse(string serviceAttachmentName) => Parse(serviceAttachmentName, 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// 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 ServiceAttachmentName Parse(string serviceAttachmentName, bool allowUnparsed) => + TryParse(serviceAttachmentName, allowUnparsed, out ServiceAttachmentName 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// + /// 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 serviceAttachmentName, out ServiceAttachmentName result) => + TryParse(serviceAttachmentName, 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// 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 serviceAttachmentName, bool allowUnparsed, out ServiceAttachmentName result) + { + gax::GaxPreconditions.CheckNotNull(serviceAttachmentName, nameof(serviceAttachmentName)); + gax::TemplatedResourceName resourceName; + if (s_projectRegionServiceAttachment.TryParseName(serviceAttachmentName, out resourceName)) + { + result = FromProjectRegionServiceAttachment(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(serviceAttachmentName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ServiceAttachmentName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string projectId = null, string regionId = null, string serviceAttachmentId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ProjectId = projectId; + RegionId = regionId; + ServiceAttachmentId = serviceAttachmentId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + public ServiceAttachmentName(string projectId, string regionId, string serviceAttachmentId) : this(ResourceNameType.ProjectRegionServiceAttachment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), serviceAttachmentId: gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))) + { + } + + /// 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 Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The Region ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string RegionId { get; } + + /// + /// The ServiceAttachment ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ServiceAttachmentId { 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.ProjectRegionServiceAttachment: return s_projectRegionServiceAttachment.Expand(ProjectId, RegionId, ServiceAttachmentId); + 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 ServiceAttachmentName); + + /// + public bool Equals(ServiceAttachmentName 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 ==(ServiceAttachmentName a, ServiceAttachmentName 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 !=(ServiceAttachmentName a, ServiceAttachmentName b) => !(a == b); + } + + public partial class Instance + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class PscAutoConnection + { + /// + /// -typed view over the resource name property. + /// + public ForwardingRuleName ForwardingRuleAsForwardingRuleName + { + get => string.IsNullOrEmpty(ForwardingRule) ? null : ForwardingRuleName.Parse(ForwardingRule, allowUnparsed: true); + set => ForwardingRule = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name + /// property. + /// + public ServiceAttachmentName ServiceAttachmentAsServiceAttachmentName + { + get => string.IsNullOrEmpty(ServiceAttachment) ? null : ServiceAttachmentName.Parse(ServiceAttachment, allowUnparsed: true); + set => ServiceAttachment = value?.ToString() ?? ""; + } + } + + public partial class PscConnection + { + /// + /// -typed view over the resource name property. + /// + public ForwardingRuleName ForwardingRuleAsForwardingRuleName + { + get => string.IsNullOrEmpty(ForwardingRule) ? null : ForwardingRuleName.Parse(ForwardingRule, allowUnparsed: true); + set => ForwardingRule = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name + /// property. + /// + public ServiceAttachmentName ServiceAttachmentAsServiceAttachmentName + { + get => string.IsNullOrEmpty(ServiceAttachment) ? null : ServiceAttachmentName.Parse(ServiceAttachment, allowUnparsed: true); + set => ServiceAttachment = value?.ToString() ?? ""; + } + } + + public partial class DiscoveryEndpoint + { + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + } + + public partial class ListInstancesRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CreateInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class DeleteInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class GetCertificateAuthorityRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CertificateAuthority + { + /// + /// -typed view over the resource name property. + /// + public gcmv::CertificateAuthorityName CertificateAuthorityName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::CertificateAuthorityName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/PackageApiMetadata.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/PackageApiMetadata.g.cs new file mode 100644 index 000000000000..aba3767ffb97 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/PackageApiMetadata.g.cs @@ -0,0 +1,74 @@ +// Copyright 2025 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 gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; + +namespace Google.Cloud.Memorystore.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.Memorystore.V1", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true) + .WithHttpRuleOverrides(new scg::Dictionary + { + { + "google.cloud.location.Locations.GetLocation", + // { "get": "/v1/{name=projects/*/locations/*}" } + proto::ByteString.FromBase64("EiEvdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKn0=") + }, + { + "google.cloud.location.Locations.ListLocations", + // { "get": "/v1/{name=projects/*}/locations" } + proto::ByteString.FromBase64("Eh8vdjEve25hbWU9cHJvamVjdHMvKn0vbG9jYXRpb25z") + }, + { + "google.longrunning.Operations.CancelOperation", + // { "post": "/v1/{name=projects/*/locations/*/operations/*}:cancel" } + proto::ByteString.FromBase64("IjUvdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9vcGVyYXRpb25zLyp9OmNhbmNlbA==") + }, + { + "google.longrunning.Operations.DeleteOperation", + // { "delete": "/v1/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("Ki4vdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9vcGVyYXRpb25zLyp9") + }, + { + "google.longrunning.Operations.GetOperation", + // { "get": "/v1/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("Ei4vdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9vcGVyYXRpb25zLyp9") + }, + { + "google.longrunning.Operations.ListOperations", + // { "get": "/v1/{name=projects/*/locations/*}/operations" } + proto::ByteString.FromBase64("EiwvdjEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKn0vb3BlcmF0aW9ucw==") + }, + }); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return gcl::LocationsReflection.Descriptor; + yield return MemorystoreReflection.Descriptor; + yield return lro::OperationsReflection.Descriptor; + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/ServiceCollectionExtensions.g.cs b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/ServiceCollectionExtensions.g.cs new file mode 100644 index 000000000000..a082a38dd570 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/Google.Cloud.Memorystore.V1/ServiceCollectionExtensions.g.cs @@ -0,0 +1,64 @@ +// Copyright 2025 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 gcl = Google.Cloud.Location; +using gcmv = Google.Cloud.Memorystore.V1; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sys = System; + +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 AddMemorystoreClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcmv::MemorystoreClientBuilder builder = new gcmv::MemorystoreClientBuilder(); + 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 AddMemorystoreClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcmv::MemorystoreClientBuilder builder = new gcmv::MemorystoreClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/apis/Google.Cloud.Memorystore.V1/gapic_metadata.json b/apis/Google.Cloud.Memorystore.V1/gapic_metadata.json new file mode 100644 index 000000000000..8e66049cf17f --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/gapic_metadata.json @@ -0,0 +1,54 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "csharp", + "protoPackage": "google.cloud.memorystore.v1", + "libraryPackage": "Google.Cloud.Memorystore.V1", + "services": { + "Memorystore": { + "clients": { + "grpc": { + "libraryClient": "MemorystoreClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "CreateInstance", + "CreateInstanceAsync" + ] + }, + "DeleteInstance": { + "methods": [ + "DeleteInstance", + "DeleteInstanceAsync" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "GetCertificateAuthority", + "GetCertificateAuthorityAsync" + ] + }, + "GetInstance": { + "methods": [ + "GetInstance", + "GetInstanceAsync" + ] + }, + "ListInstances": { + "methods": [ + "ListInstances", + "ListInstancesAsync" + ] + }, + "UpdateInstance": { + "methods": [ + "UpdateInstance", + "UpdateInstanceAsync" + ] + } + } + } + } + } + } +} From 8d6a668cdabdbd33fbf83eaf821c2e0a31f4969c Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:14:04 +0000 Subject: [PATCH 4/6] chore: Generate Google.Cloud.Memorystore.V1Beta --- .../.OwlBot.yaml | 31 + .../.repo-metadata.json | 8 + ...emorystore.V1Beta.GeneratedSnippets.csproj | 20 + ...toreClient.CreateInstanceAsyncSnippet.g.cs | 63 + ...eateInstanceRequestObjectAsyncSnippet.g.cs | 68 + ...nt.CreateInstanceRequestObjectSnippet.g.cs | 67 + ...eateInstanceResourceNamesAsyncSnippet.g.cs | 64 + ...nt.CreateInstanceResourceNamesSnippet.g.cs | 63 + ...morystoreClient.CreateInstanceSnippet.g.cs | 62 + ...toreClient.DeleteInstanceAsyncSnippet.g.cs | 62 + ...leteInstanceRequestObjectAsyncSnippet.g.cs | 66 + ...nt.DeleteInstanceRequestObjectSnippet.g.cs | 65 + ...leteInstanceResourceNamesAsyncSnippet.g.cs | 62 + ...nt.DeleteInstanceResourceNamesSnippet.g.cs | 61 + ...morystoreClient.DeleteInstanceSnippet.g.cs | 61 + ...t.GetCertificateAuthorityAsyncSnippet.g.cs | 44 + ...ateAuthorityRequestObjectAsyncSnippet.g.cs | 47 + ...tificateAuthorityRequestObjectSnippet.g.cs | 46 + ...ateAuthorityResourceNamesAsyncSnippet.g.cs | 44 + ...tificateAuthorityResourceNamesSnippet.g.cs | 43 + ...Client.GetCertificateAuthoritySnippet.g.cs | 43 + ...rystoreClient.GetInstanceAsyncSnippet.g.cs | 44 + ....GetInstanceRequestObjectAsyncSnippet.g.cs | 47 + ...lient.GetInstanceRequestObjectSnippet.g.cs | 46 + ....GetInstanceResourceNamesAsyncSnippet.g.cs | 44 + ...lient.GetInstanceResourceNamesSnippet.g.cs | 43 + .../MemorystoreClient.GetInstanceSnippet.g.cs | 43 + ...storeClient.ListInstancesAsyncSnippet.g.cs | 79 + ...istInstancesRequestObjectAsyncSnippet.g.cs | 85 + ...ent.ListInstancesRequestObjectSnippet.g.cs | 83 + ...istInstancesResourceNamesAsyncSnippet.g.cs | 80 + ...ent.ListInstancesResourceNamesSnippet.g.cs | 78 + ...emorystoreClient.ListInstancesSnippet.g.cs | 77 + ...toreClient.UpdateInstanceAsyncSnippet.g.cs | 63 + ...dateInstanceRequestObjectAsyncSnippet.g.cs | 67 + ...nt.UpdateInstanceRequestObjectSnippet.g.cs | 66 + ...morystoreClient.UpdateInstanceSnippet.g.cs | 62 + ...adata_google.cloud.memorystore.v1beta.json | 1713 ++++ ...e.Cloud.Memorystore.V1Beta.Snippets.csproj | 20 + .../MemorystoreClientSnippets.g.cs | 997 ++ .../Google.Cloud.Memorystore.V1Beta.sln | 37 + .../Google.Cloud.Memorystore.V1Beta.csproj | 17 + .../Memorystore.g.cs | 8169 +++++++++++++++++ .../MemorystoreClient.g.cs | 1507 +++ .../MemorystoreGrpc.g.cs | 573 ++ .../MemorystoreResourceNames.g.cs | 1436 +++ .../PackageApiMetadata.g.cs | 74 + .../ServiceCollectionExtensions.g.cs | 64 + .../gapic_metadata.json | 54 + 49 files changed, 16758 insertions(+) create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/.OwlBot.yaml create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/.repo-metadata.json create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1beta.json create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/Google.Cloud.Memorystore.V1Beta.Snippets.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/MemorystoreClientSnippets.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.sln create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.csproj create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Memorystore.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreClient.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreGrpc.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreResourceNames.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/PackageApiMetadata.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/ServiceCollectionExtensions.g.cs create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/gapic_metadata.json diff --git a/apis/Google.Cloud.Memorystore.V1Beta/.OwlBot.yaml b/apis/Google.Cloud.Memorystore.V1Beta/.OwlBot.yaml new file mode 100644 index 000000000000..bfdab39eb091 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/.OwlBot.yaml @@ -0,0 +1,31 @@ + +# Copyright 2025 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. + +squash: true + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/memorystore/v1beta/.*-csharp/Google.Cloud.Memorystore.V1Beta + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta + - source: /google/cloud/memorystore/v1beta/.*-csharp/Google.Cloud.Memorystore.V1Beta.Snippets + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets + - source: /google/cloud/memorystore/v1beta/.*-csharp/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets + - source: /google/cloud/memorystore/v1beta/.*-csharp/gapic_metadata.json + dest: /owl-bot-staging/Google.Cloud.Memorystore.V1Beta/gapic_metadata.json + +api-name: Google.Cloud.Memorystore.V1Beta diff --git a/apis/Google.Cloud.Memorystore.V1Beta/.repo-metadata.json b/apis/Google.Cloud.Memorystore.V1Beta/.repo-metadata.json new file mode 100644 index 000000000000..26b1cf2f1ee1 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "distribution_name": "Google.Cloud.Memorystore.V1Beta", + "release_level": "unreleased", + "client_documentation": "https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/latest", + "library_type": "GAPIC_AUTO", + "language": "dotnet", + "api_shortname": "memorystore" +} \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets.csproj b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets.csproj new file mode 100644 index 000000000000..14d6f59debbb --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets.csproj @@ -0,0 +1,20 @@ + + + + net6.0;net462 + net6.0 + false + 1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..65d9f5f77e52 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceAsyncSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..9f4583620322 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,68 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_async] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..6db1c68c1429 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,67 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_sync] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.CreateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..88cc2e6dcd21 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,64 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstanceAsync + /// + /// 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 CreateInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..24e71a1baf37 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened_resourceNames] + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs new file mode 100644 index 000000000000..b1d606297d7b --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.CreateInstanceSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for CreateInstance + /// + /// 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 CreateInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..e71adb8e1c00 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..9475f89174ee --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,66 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_async] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..b90fef3b8f51 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,65 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_sync] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.DeleteInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..cc8fbc67d488 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstanceAsync + /// + /// 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 DeleteInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..ab28eca5670d --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs new file mode 100644 index 000000000000..bc25bae7e51d --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.DeleteInstanceSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for DeleteInstance + /// + /// 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 DeleteInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs new file mode 100644 index 000000000000..f06dfd3687a1 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..2ec6ecdf2629 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..9f439a0f3f3f --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthorityRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(request); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..ec6fca0588d9 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthorityAsync + /// + /// 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 GetCertificateAuthorityResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..aa705a3f6325 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthorityResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs new file mode 100644 index 000000000000..4bd5977509bf --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetCertificateAuthoritySnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetCertificateAuthority + /// + /// 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 GetCertificateAuthority() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..ab6d3798f179 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..aaae9f5a9b31 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_async] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(request); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..c3dfac0e53d4 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_sync] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = memorystoreClient.GetInstance(request); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..a0bd4214ef6c --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstanceAsync + /// + /// 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 GetInstanceResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..c651f837c884 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened_resourceNames] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstanceResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = memorystoreClient.GetInstance(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs new file mode 100644 index 000000000000..d731daf42e43 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.GetInstanceSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened] + using Google.Cloud.Memorystore.V1Beta; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for GetInstance + /// + /// 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 GetInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = memorystoreClient.GetInstance(name); + } + } + // [END memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs new file mode 100644 index 000000000000..6c69c4e3d0dd --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened] + using Google.Api.Gax; + using Google.Cloud.Memorystore.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..c0a3b1e973f1 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,85 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_async] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..3c1eb8829c74 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs @@ -0,0 +1,83 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstancesRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..843527de0704 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,80 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstancesAsync + /// + /// 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 ListInstancesResourceNamesAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..9251dde30150 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs @@ -0,0 +1,78 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstancesResourceNames() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs new file mode 100644 index 000000000000..bd8b43f4f0b6 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.ListInstancesSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Memorystore.V1Beta; + using System; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + /// + /// 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 ListInstances() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs new file mode 100644 index 000000000000..8eea74f32218 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_UpdateInstance_async_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstanceAsync + /// + /// 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 UpdateInstanceAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_UpdateInstance_async_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..828589093ddb --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,67 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_UpdateInstance_async] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstanceAsync + /// + /// 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 UpdateInstanceRequestObjectAsync() + { + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_UpdateInstance_async] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..81379ba69c0c --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs @@ -0,0 +1,66 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_UpdateInstance_sync] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstance + /// + /// 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 UpdateInstanceRequestObject() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.UpdateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_UpdateInstance_sync] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs new file mode 100644 index 000000000000..3aa72fc20f3c --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/MemorystoreClient.UpdateInstanceSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2025 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 memorystore_v1beta_generated_Memorystore_UpdateInstance_sync_flattened] + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedMemorystoreClientSnippets + { + /// Snippet for UpdateInstance + /// + /// 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 UpdateInstance() + { + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = memorystoreClient.UpdateInstance(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + } + } + // [END memorystore_v1beta_generated_Memorystore_UpdateInstance_sync_flattened] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1beta.json b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1beta.json new file mode 100644 index 000000000000..36f9a0e5563c --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.memorystore.v1beta.json @@ -0,0 +1,1713 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.Memorystore.V1Beta", + "language": "C_SHARP", + "apis": [ + { + "id": "google.cloud.memorystore.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_sync", + "title": "ListInstancesRequestObject", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.ListInstancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 81, + "type": "FULL" + }, + { + "start": 37, + "end": 79, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_async", + "title": "ListInstancesRequestObjectAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.ListInstancesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 83, + "type": "FULL" + }, + { + "start": 39, + "end": 81, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened", + "title": "ListInstances", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened", + "title": "ListInstancesAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_sync_flattened_resourceNames", + "title": "ListInstancesResourceNames", + "description": "Snippet for ListInstances", + "file": "MemorystoreClient.ListInstancesResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstances", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 76, + "type": "FULL" + }, + { + "start": 37, + "end": 74, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_ListInstances_async_flattened_resourceNames", + "title": "ListInstancesResourceNamesAsync", + "description": "Snippet for ListInstancesAsync", + "file": "MemorystoreClient.ListInstancesResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListInstancesAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.ListInstancesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "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": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.ListInstances", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 78, + "type": "FULL" + }, + { + "start": 39, + "end": 76, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_sync", + "title": "GetInstanceRequestObject", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.GetInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_async", + "title": "GetInstanceRequestObjectAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.GetInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened", + "title": "GetInstance", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened", + "title": "GetInstanceAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_sync_flattened_resourceNames", + "title": "GetInstanceResourceNames", + "description": "Snippet for GetInstance", + "file": "MemorystoreClient.GetInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.Instance", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetInstance_async_flattened_resourceNames", + "title": "GetInstanceResourceNamesAsync", + "description": "Snippet for GetInstanceAsync", + "file": "MemorystoreClient.GetInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_sync", + "title": "CreateInstanceRequestObject", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 65, + "type": "FULL" + }, + { + "start": 36, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_async", + "title": "CreateInstanceRequestObjectAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 66, + "type": "FULL" + }, + { + "start": 37, + "end": 64, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened", + "title": "CreateInstance", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 35, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened", + "title": "CreateInstanceAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 36, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_sync_flattened_resourceNames", + "title": "CreateInstanceResourceNames", + "description": "Snippet for CreateInstance", + "file": "MemorystoreClient.CreateInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstance", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 36, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_CreateInstance_async_flattened_resourceNames", + "title": "CreateInstanceResourceNamesAsync", + "description": "Snippet for CreateInstanceAsync", + "file": "MemorystoreClient.CreateInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.CreateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "System.String", + "name": "instanceId" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.CreateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 62, + "type": "FULL" + }, + { + "start": 37, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_UpdateInstance_sync", + "title": "UpdateInstanceRequestObject", + "description": "Snippet for UpdateInstance", + "file": "MemorystoreClient.UpdateInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.UpdateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_UpdateInstance_async", + "title": "UpdateInstanceRequestObjectAsync", + "description": "Snippet for UpdateInstanceAsync", + "file": "MemorystoreClient.UpdateInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.UpdateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 65, + "type": "FULL" + }, + { + "start": 37, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_UpdateInstance_sync_flattened", + "title": "UpdateInstance", + "description": "Snippet for UpdateInstance", + "file": "MemorystoreClient.UpdateInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.UpdateInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 36, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_UpdateInstance_async_flattened", + "title": "UpdateInstanceAsync", + "description": "Snippet for UpdateInstanceAsync", + "file": "MemorystoreClient.UpdateInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.UpdateInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.Instance", + "name": "instance" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.UpdateInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 37, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_sync", + "title": "DeleteInstanceRequestObject", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 63, + "type": "FULL" + }, + { + "start": 36, + "end": 61, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_async", + "title": "DeleteInstanceRequestObjectAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 37, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened", + "title": "DeleteInstance", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened", + "title": "DeleteInstanceAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 37, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_sync_flattened_resourceNames", + "title": "DeleteInstanceResourceNames", + "description": "Snippet for DeleteInstance", + "file": "MemorystoreClient.DeleteInstanceResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstance", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_DeleteInstance_async_flattened_resourceNames", + "title": "DeleteInstanceResourceNamesAsync", + "description": "Snippet for DeleteInstanceAsync", + "file": "MemorystoreClient.DeleteInstanceResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteInstanceAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.DeleteInstanceAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.DeleteInstance", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 37, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync", + "title": "GetCertificateAuthorityRequestObject", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthorityRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async", + "title": "GetCertificateAuthorityRequestObjectAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened", + "title": "GetCertificateAuthority", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthoritySnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened", + "title": "GetCertificateAuthorityAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync_flattened_resourceNames", + "title": "GetCertificateAuthorityResourceNames", + "description": "Snippet for GetCertificateAuthority", + "file": "MemorystoreClient.GetCertificateAuthorityResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthority", + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Memorystore.V1Beta.CertificateAuthority", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_async_flattened_resourceNames", + "title": "GetCertificateAuthorityResourceNamesAsync", + "description": "Snippet for GetCertificateAuthorityAsync", + "file": "MemorystoreClient.GetCertificateAuthorityResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetCertificateAuthorityAsync", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient.GetCertificateAuthorityAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Memorystore.V1Beta.InstanceName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "MemorystoreClient", + "fullName": "Google.Cloud.Memorystore.V1Beta.MemorystoreClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.memorystore.v1beta.Memorystore.GetCertificateAuthority", + "service": { + "shortName": "Memorystore", + "fullName": "google.cloud.memorystore.v1beta.Memorystore" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + } + ] +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/Google.Cloud.Memorystore.V1Beta.Snippets.csproj b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/Google.Cloud.Memorystore.V1Beta.Snippets.csproj new file mode 100644 index 000000000000..14d6f59debbb --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/Google.Cloud.Memorystore.V1Beta.Snippets.csproj @@ -0,0 +1,20 @@ + + + + net6.0;net462 + net6.0 + false + 1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/MemorystoreClientSnippets.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/MemorystoreClientSnippets.g.cs new file mode 100644 index 000000000000..8ef71bf78927 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.Snippets/MemorystoreClientSnippets.g.cs @@ -0,0 +1,997 @@ +// Copyright 2025 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 +{ + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.Memorystore.V1Beta; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Linq; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedMemorystoreClientSnippets + { + /// Snippet for ListInstances + public void ListInstancesRequestObject() + { + // Snippet: ListInstances(ListInstancesRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesRequestObjectAsync() + { + // Snippet: ListInstancesAsync(ListInstancesRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstances + public void ListInstances() + { + // Snippet: ListInstances(string, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesAsync() + { + // Snippet: ListInstancesAsync(string, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstances + public void ListInstancesResourceNames() + { + // Snippet: ListInstances(LocationName, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = memorystoreClient.ListInstances(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 ListInstancesAsync + public async Task ListInstancesResourceNamesAsync() + { + // Snippet: ListInstancesAsync(LocationName, string, int?, CallSettings) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = memorystoreClient.ListInstancesAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Instance 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((ListInstancesResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Instance 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 (Instance 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 GetInstance + public void GetInstanceRequestObject() + { + // Snippet: GetInstance(GetInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = memorystoreClient.GetInstance(request); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceRequestObjectAsync() + { + // Snippet: GetInstanceAsync(GetInstanceRequest, CallSettings) + // Additional: GetInstanceAsync(GetInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetInstanceRequest request = new GetInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(request); + // End snippet + } + + /// Snippet for GetInstance + public void GetInstance() + { + // Snippet: GetInstance(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = memorystoreClient.GetInstance(name); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceAsync() + { + // Snippet: GetInstanceAsync(string, CallSettings) + // Additional: GetInstanceAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + // End snippet + } + + /// Snippet for GetInstance + public void GetInstanceResourceNames() + { + // Snippet: GetInstance(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = memorystoreClient.GetInstance(name); + // End snippet + } + + /// Snippet for GetInstanceAsync + public async Task GetInstanceResourceNamesAsync() + { + // Snippet: GetInstanceAsync(InstanceName, CallSettings) + // Additional: GetInstanceAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Instance response = await memorystoreClient.GetInstanceAsync(name); + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstanceRequestObject() + { + // Snippet: CreateInstance(CreateInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.CreateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceRequestObjectAsync() + { + // Snippet: CreateInstanceAsync(CreateInstanceRequest, CallSettings) + // Additional: CreateInstanceAsync(CreateInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + CreateInstanceRequest request = new CreateInstanceRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + InstanceId = "", + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstance() + { + // Snippet: CreateInstance(string, Instance, string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceAsync() + { + // Snippet: CreateInstanceAsync(string, Instance, string, CallSettings) + // Additional: CreateInstanceAsync(string, Instance, string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstance + public void CreateInstanceResourceNames() + { + // Snippet: CreateInstance(LocationName, Instance, string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = memorystoreClient.CreateInstance(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceCreateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateInstanceAsync + public async Task CreateInstanceResourceNamesAsync() + { + // Snippet: CreateInstanceAsync(LocationName, Instance, string, CallSettings) + // Additional: CreateInstanceAsync(LocationName, Instance, string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + Instance instance = new Instance(); + string instanceId = ""; + // Make the request + Operation response = await memorystoreClient.CreateInstanceAsync(parent, instance, instanceId); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceCreateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstance + public void UpdateInstanceRequestObject() + { + // Snippet: UpdateInstance(UpdateInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.UpdateInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstanceAsync + public async Task UpdateInstanceRequestObjectAsync() + { + // Snippet: UpdateInstanceAsync(UpdateInstanceRequest, CallSettings) + // Additional: UpdateInstanceAsync(UpdateInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + UpdateInstanceRequest request = new UpdateInstanceRequest + { + UpdateMask = new FieldMask(), + Instance = new Instance(), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstance + public void UpdateInstance() + { + // Snippet: UpdateInstance(Instance, FieldMask, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = memorystoreClient.UpdateInstance(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceUpdateInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for UpdateInstanceAsync + public async Task UpdateInstanceAsync() + { + // Snippet: UpdateInstanceAsync(Instance, FieldMask, CallSettings) + // Additional: UpdateInstanceAsync(Instance, FieldMask, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + Instance instance = new Instance(); + FieldMask updateMask = new FieldMask(); + // Make the request + Operation response = await memorystoreClient.UpdateInstanceAsync(instance, updateMask); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Instance result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceUpdateInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Instance retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstanceRequestObject() + { + // Snippet: DeleteInstance(DeleteInstanceRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = memorystoreClient.DeleteInstance(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceRequestObjectAsync() + { + // Snippet: DeleteInstanceAsync(DeleteInstanceRequest, CallSettings) + // Additional: DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + DeleteInstanceRequest request = new DeleteInstanceRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + RequestId = "", + }; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstance() + { + // Snippet: DeleteInstance(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceAsync() + { + // Snippet: DeleteInstanceAsync(string, CallSettings) + // Additional: DeleteInstanceAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstance + public void DeleteInstanceResourceNames() + { + // Snippet: DeleteInstance(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = memorystoreClient.DeleteInstance(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = memorystoreClient.PollOnceDeleteInstance(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for DeleteInstanceAsync + public async Task DeleteInstanceResourceNamesAsync() + { + // Snippet: DeleteInstanceAsync(InstanceName, CallSettings) + // Additional: DeleteInstanceAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + Operation response = await memorystoreClient.DeleteInstanceAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Empty result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await memorystoreClient.PollOnceDeleteInstanceAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Empty retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthorityRequestObject() + { + // Snippet: GetCertificateAuthority(GetCertificateAuthorityRequest, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(request); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityRequestObjectAsync() + { + // Snippet: GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CallSettings) + // Additional: GetCertificateAuthorityAsync(GetCertificateAuthorityRequest, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + GetCertificateAuthorityRequest request = new GetCertificateAuthorityRequest + { + InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"), + }; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(request); + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthority() + { + // Snippet: GetCertificateAuthority(string, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityAsync() + { + // Snippet: GetCertificateAuthorityAsync(string, CallSettings) + // Additional: GetCertificateAuthorityAsync(string, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]"; + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + // End snippet + } + + /// Snippet for GetCertificateAuthority + public void GetCertificateAuthorityResourceNames() + { + // Snippet: GetCertificateAuthority(InstanceName, CallSettings) + // Create client + MemorystoreClient memorystoreClient = MemorystoreClient.Create(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = memorystoreClient.GetCertificateAuthority(name); + // End snippet + } + + /// Snippet for GetCertificateAuthorityAsync + public async Task GetCertificateAuthorityResourceNamesAsync() + { + // Snippet: GetCertificateAuthorityAsync(InstanceName, CallSettings) + // Additional: GetCertificateAuthorityAsync(InstanceName, CancellationToken) + // Create client + MemorystoreClient memorystoreClient = await MemorystoreClient.CreateAsync(); + // Initialize request argument(s) + InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + // Make the request + CertificateAuthority response = await memorystoreClient.GetCertificateAuthorityAsync(name); + // End snippet + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.sln b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.sln new file mode 100644 index 000000000000..dd70e449bcf4 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32516.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1Beta", "Google.Cloud.Memorystore.V1Beta\Google.Cloud.Memorystore.V1Beta.csproj", "{102E3B31-C64F-C8FF-9512-8345BF42F615}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1Beta.Snippets", "Google.Cloud.Memorystore.V1Beta.Snippets\Google.Cloud.Memorystore.V1Beta.Snippets.csproj", "{294EDF11-053F-80FD-FAB1-2684963B45E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.Memorystore.V1Beta.GeneratedSnippets", "Google.Cloud.Memorystore.V1Beta.GeneratedSnippets\Google.Cloud.Memorystore.V1Beta.GeneratedSnippets.csproj", "{3288379B-862C-95BD-350E-E81D601D7B57}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ClientTesting", "..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj", "{29974B0C-A7B0-8CA8-AE32-99F622C89044}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {102E3B31-C64F-C8FF-9512-8345BF42F615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {102E3B31-C64F-C8FF-9512-8345BF42F615}.Debug|Any CPU.Build.0 = Debug|Any CPU + {102E3B31-C64F-C8FF-9512-8345BF42F615}.Release|Any CPU.ActiveCfg = Release|Any CPU + {102E3B31-C64F-C8FF-9512-8345BF42F615}.Release|Any CPU.Build.0 = Release|Any CPU + {294EDF11-053F-80FD-FAB1-2684963B45E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {294EDF11-053F-80FD-FAB1-2684963B45E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {294EDF11-053F-80FD-FAB1-2684963B45E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {294EDF11-053F-80FD-FAB1-2684963B45E1}.Release|Any CPU.Build.0 = Release|Any CPU + {3288379B-862C-95BD-350E-E81D601D7B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3288379B-862C-95BD-350E-E81D601D7B57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3288379B-862C-95BD-350E-E81D601D7B57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3288379B-862C-95BD-350E-E81D601D7B57}.Release|Any CPU.Build.0 = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.csproj b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.csproj new file mode 100644 index 000000000000..d574dcd9a291 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta.csproj @@ -0,0 +1,17 @@ + + + + 1.0.0-beta00 + netstandard2.0;net462 + true + Recommended Google client library to administer Cloud Memorystore (v1beta), a fully-managed database service that provides a managed version of popular open source caching solutions. + Google;Cloud + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Memorystore.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Memorystore.g.cs new file mode 100644 index 000000000000..bf460183193c --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/Memorystore.g.cs @@ -0,0 +1,8169 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/memorystore/v1beta/memorystore.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.Memorystore.V1Beta { + + /// Holder for reflection information generated from google/cloud/memorystore/v1beta/memorystore.proto + public static partial class MemorystoreReflection { + + #region Descriptor + /// File descriptor for google/cloud/memorystore/v1beta/memorystore.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MemorystoreReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjFnb29nbGUvY2xvdWQvbWVtb3J5c3RvcmUvdjFiZXRhL21lbW9yeXN0b3Jl", + "LnByb3RvEh9nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRhGhxnb29n", + "bGUvYXBpL2Fubm90YXRpb25zLnByb3RvGhdnb29nbGUvYXBpL2NsaWVudC5w", + "cm90bxofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90bxobZ29vZ2xl", + "L2FwaS9maWVsZF9pbmZvLnByb3RvGhlnb29nbGUvYXBpL3Jlc291cmNlLnBy", + "b3RvGiNnb29nbGUvbG9uZ3J1bm5pbmcvb3BlcmF0aW9ucy5wcm90bxobZ29v", + "Z2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvGiBnb29nbGUvcHJvdG9idWYvZmll", + "bGRfbWFzay5wcm90bxofZ29vZ2xlL3Byb3RvYnVmL3RpbWVzdGFtcC5wcm90", + "byLmFQoISW5zdGFuY2USEQoEbmFtZRgBIAEoCUID4EEIEjQKC2NyZWF0ZV90", + "aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEjQK", + "C3VwZGF0ZV90aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt", + "cEID4EEDEkoKBmxhYmVscxgEIAMoCzI1Lmdvb2dsZS5jbG91ZC5tZW1vcnlz", + "dG9yZS52MWJldGEuSW5zdGFuY2UuTGFiZWxzRW50cnlCA+BBARJDCgVzdGF0", + "ZRgFIAEoDjIvLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5z", + "dGFuY2UuU3RhdGVCA+BBAxJMCgpzdGF0ZV9pbmZvGAYgASgLMjMuZ29vZ2xl", + "LmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5JbnN0YW5jZS5TdGF0ZUluZm9C", + "A+BBAxIYCgN1aWQYByABKAlCC+BBA+KMz9cIAggBEh8KDXJlcGxpY2FfY291", + "bnQYCCABKAVCA+BBAUgAiAEBEl8KEmF1dGhvcml6YXRpb25fbW9kZRgJIAEo", + "DjI7Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5zdGFuY2Uu", + "QXV0aG9yaXphdGlvbk1vZGVCBuBBAeBBBRJoChd0cmFuc2l0X2VuY3J5cHRp", + "b25fbW9kZRgKIAEoDjI/Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJl", + "dGEuSW5zdGFuY2UuVHJhbnNpdEVuY3J5cHRpb25Nb2RlQgbgQQHgQQUSGAoL", + "c2hhcmRfY291bnQYCyABKAVCA+BBARJUChNkaXNjb3ZlcnlfZW5kcG9pbnRz", + "GAwgAygLMjIuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5EaXNj", + "b3ZlcnlFbmRwb2ludEID4EEDEk0KCW5vZGVfdHlwZRgNIAEoDjIyLmdvb2ds", + "ZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5zdGFuY2UuTm9kZVR5cGVC", + "BuBBAeBBBRJTChJwZXJzaXN0ZW5jZV9jb25maWcYDiABKAsyMi5nb29nbGUu", + "Y2xvdWQubWVtb3J5c3RvcmUudjFiZXRhLlBlcnNpc3RlbmNlQ29uZmlnQgPg", + "QQESHgoOZW5naW5lX3ZlcnNpb24YDyABKAlCBuBBAeBBBRJZCg5lbmdpbmVf", + "Y29uZmlncxgQIAMoCzI8Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJl", + "dGEuSW5zdGFuY2UuRW5naW5lQ29uZmlnc0VudHJ5QgPgQQESRQoLbm9kZV9j", + "b25maWcYESABKAsyKy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRh", + "Lk5vZGVDb25maWdCA+BBAxJhChh6b25lX2Rpc3RyaWJ1dGlvbl9jb25maWcY", + "EiABKAsyNy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRhLlpvbmVE", + "aXN0cmlidXRpb25Db25maWdCBuBBAeBBBRItChtkZWxldGlvbl9wcm90ZWN0", + "aW9uX2VuYWJsZWQYEyABKAhCA+BBAUgBiAEBElgKFHBzY19hdXRvX2Nvbm5l", + "Y3Rpb25zGBQgAygLMjIuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0", + "YS5Qc2NBdXRvQ29ubmVjdGlvbkIG4EEC4EEFElIKCWVuZHBvaW50cxgZIAMo", + "CzI6Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5zdGFuY2Uu", + "SW5zdGFuY2VFbmRwb2ludEID4EEBEkEKBG1vZGUYGiABKA4yLi5nb29nbGUu", + "Y2xvdWQubWVtb3J5c3RvcmUudjFiZXRhLkluc3RhbmNlLk1vZGVCA+BBARr8", + "AQoJU3RhdGVJbmZvEloKC3VwZGF0ZV9pbmZvGAEgASgLMj4uZ29vZ2xlLmNs", + "b3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5JbnN0YW5jZS5TdGF0ZUluZm8uVXBk", + "YXRlSW5mb0ID4EEDSAAaigEKClVwZGF0ZUluZm8SJAoSdGFyZ2V0X3NoYXJk", + "X2NvdW50GAEgASgFQgPgQQNIAIgBARImChR0YXJnZXRfcmVwbGljYV9jb3Vu", + "dBgCIAEoBUID4EEDSAGIAQFCFQoTX3RhcmdldF9zaGFyZF9jb3VudEIXChVf", + "dGFyZ2V0X3JlcGxpY2FfY291bnRCBgoEaW5mbxpoChBJbnN0YW5jZUVuZHBv", + "aW50ElQKC2Nvbm5lY3Rpb25zGAEgAygLMjouZ29vZ2xlLmNsb3VkLm1lbW9y", + "eXN0b3JlLnYxYmV0YS5JbnN0YW5jZS5Db25uZWN0aW9uRGV0YWlsQgPgQQEa", + "vQEKEENvbm5lY3Rpb25EZXRhaWwSUQoTcHNjX2F1dG9fY29ubmVjdGlvbhgB", + "IAEoCzIyLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuUHNjQXV0", + "b0Nvbm5lY3Rpb25IABJICg5wc2NfY29ubmVjdGlvbhgCIAEoCzIuLmdvb2ds", + "ZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuUHNjQ29ubmVjdGlvbkgAQgwK", + "CmNvbm5lY3Rpb24aLQoLTGFiZWxzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZh", + "bHVlGAIgASgJOgI4ARo0ChJFbmdpbmVDb25maWdzRW50cnkSCwoDa2V5GAEg", + "ASgJEg0KBXZhbHVlGAIgASgJOgI4ASJUCgVTdGF0ZRIVChFTVEFURV9VTlNQ", + "RUNJRklFRBAAEgwKCENSRUFUSU5HEAESCgoGQUNUSVZFEAISDAoIVVBEQVRJ", + "TkcQAxIMCghERUxFVElORxAEIlgKEUF1dGhvcml6YXRpb25Nb2RlEiIKHkFV", + "VEhPUklaQVRJT05fTU9ERV9VTlNQRUNJRklFRBAAEhEKDUFVVEhfRElTQUJM", + "RUQQARIMCghJQU1fQVVUSBACInwKFVRyYW5zaXRFbmNyeXB0aW9uTW9kZRIn", + "CiNUUkFOU0lUX0VOQ1JZUFRJT05fTU9ERV9VTlNQRUNJRklFRBAAEh8KG1RS", + "QU5TSVRfRU5DUllQVElPTl9ESVNBQkxFRBABEhkKFVNFUlZFUl9BVVRIRU5U", + "SUNBVElPThACIncKCE5vZGVUeXBlEhkKFU5PREVfVFlQRV9VTlNQRUNJRklF", + "RBAAEhQKEFNIQVJFRF9DT1JFX05BTk8QARISCg5ISUdITUVNX01FRElVTRAC", + "EhIKDkhJR0hNRU1fWExBUkdFEAMSEgoOU1RBTkRBUkRfU01BTEwQBCI5CgRN", + "b2RlEhQKEE1PREVfVU5TUEVDSUZJRUQQABIOCgpTVEFOREFMT05FEAESCwoH", + "Q0xVU1RFUhACOnvqQXgKI21lbW9yeXN0b3JlLmdvb2dsZWFwaXMuY29tL0lu", + "c3RhbmNlEjxwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRpb25zL3tsb2NhdGlv", + "bn0vaW5zdGFuY2VzL3tpbnN0YW5jZX0qCWluc3RhbmNlczIIaW5zdGFuY2VC", + "EAoOX3JlcGxpY2FfY291bnRCHgocX2RlbGV0aW9uX3Byb3RlY3Rpb25fZW5h", + "YmxlZCKGBAoRUHNjQXV0b0Nvbm5lY3Rpb24SFgoEcG9ydBgJIAEoBUIG4EED", + "4EEBSAASHgoRcHNjX2Nvbm5lY3Rpb25faWQYASABKAlCA+BBAxIfCgppcF9h", + "ZGRyZXNzGAIgASgJQgvgQQPijM/XCAIIAhJGCg9mb3J3YXJkaW5nX3J1bGUY", + "AyABKAlCLeBBA/pBJwolY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9Gb3J3YXJk", + "aW5nUnVsZRIXCgpwcm9qZWN0X2lkGAQgASgJQgPgQQISNwoHbmV0d29yaxgF", + "IAEoCUIm4EEC+kEgCh5jb21wdXRlLmdvb2dsZWFwaXMuY29tL05ldHdvcmsS", + "TAoSc2VydmljZV9hdHRhY2htZW50GAYgASgJQjDgQQP6QSoKKGNvbXB1dGUu", + "Z29vZ2xlYXBpcy5jb20vU2VydmljZUF0dGFjaG1lbnQSWAoVcHNjX2Nvbm5l", + "Y3Rpb25fc3RhdHVzGAcgASgOMjQuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3Jl", + "LnYxYmV0YS5Qc2NDb25uZWN0aW9uU3RhdHVzQgPgQQMSTQoPY29ubmVjdGlv", + "bl90eXBlGAggASgOMi8uZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0", + "YS5Db25uZWN0aW9uVHlwZUID4EEDQgcKBXBvcnRzIuEDCg1Qc2NDb25uZWN0", + "aW9uEh4KEXBzY19jb25uZWN0aW9uX2lkGAEgASgJQgPgQQMSHwoKaXBfYWRk", + "cmVzcxgCIAEoCUIL4EEC4ozP1wgCCAISRgoPZm9yd2FyZGluZ19ydWxlGAMg", + "ASgJQi3gQQL6QScKJWNvbXB1dGUuZ29vZ2xlYXBpcy5jb20vRm9yd2FyZGlu", + "Z1J1bGUSFwoKcHJvamVjdF9pZBgEIAEoCUID4EEDEjcKB25ldHdvcmsYBSAB", + "KAlCJuBBAvpBIAoeY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9OZXR3b3JrEkwK", + "EnNlcnZpY2VfYXR0YWNobWVudBgGIAEoCUIw4EEC+kEqCihjb21wdXRlLmdv", + "b2dsZWFwaXMuY29tL1NlcnZpY2VBdHRhY2htZW50ElgKFXBzY19jb25uZWN0", + "aW9uX3N0YXR1cxgHIAEoDjI0Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52", + "MWJldGEuUHNjQ29ubmVjdGlvblN0YXR1c0ID4EEDEk0KD2Nvbm5lY3Rpb25f", + "dHlwZRgIIAEoDjIvLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEu", + "Q29ubmVjdGlvblR5cGVCA+BBAyJ1ChFEaXNjb3ZlcnlFbmRwb2ludBIUCgdh", + "ZGRyZXNzGAEgASgJQgPgQQMSEQoEcG9ydBgCIAEoBUID4EEDEjcKB25ldHdv", + "cmsYBCABKAlCJuBBA/pBIAoeY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9OZXR3", + "b3JrIusGChFQZXJzaXN0ZW5jZUNvbmZpZxJVCgRtb2RlGAEgASgOMkIuZ29v", + "Z2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5QZXJzaXN0ZW5jZUNvbmZp", + "Zy5QZXJzaXN0ZW5jZU1vZGVCA+BBARJVCgpyZGJfY29uZmlnGAIgASgLMjwu", + "Z29vZ2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5QZXJzaXN0ZW5jZUNv", + "bmZpZy5SREJDb25maWdCA+BBARJVCgphb2ZfY29uZmlnGAMgASgLMjwuZ29v", + "Z2xlLmNsb3VkLm1lbW9yeXN0b3JlLnYxYmV0YS5QZXJzaXN0ZW5jZUNvbmZp", + "Zy5BT0ZDb25maWdCA+BBARq1AgoJUkRCQ29uZmlnEm0KE3JkYl9zbmFwc2hv", + "dF9wZXJpb2QYASABKA4ySy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFi", + "ZXRhLlBlcnNpc3RlbmNlQ29uZmlnLlJEQkNvbmZpZy5TbmFwc2hvdFBlcmlv", + "ZEID4EEBEkAKF3JkYl9zbmFwc2hvdF9zdGFydF90aW1lGAIgASgLMhouZ29v", + "Z2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEBIncKDlNuYXBzaG90UGVyaW9k", + "Eh8KG1NOQVBTSE9UX1BFUklPRF9VTlNQRUNJRklFRBAAEgwKCE9ORV9IT1VS", + "EAESDQoJU0lYX0hPVVJTEAISEAoMVFdFTFZFX0hPVVJTEAMSFQoRVFdFTlRZ", + "X0ZPVVJfSE9VUlMQBBrDAQoJQU9GQ29uZmlnEmMKDGFwcGVuZF9mc3luYxgB", + "IAEoDjJILmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuUGVyc2lz", + "dGVuY2VDb25maWcuQU9GQ29uZmlnLkFwcGVuZEZzeW5jQgPgQQEiUQoLQXBw", + "ZW5kRnN5bmMSHAoYQVBQRU5EX0ZTWU5DX1VOU1BFQ0lGSUVEEAASCQoFTkVW", + "RVIQARINCglFVkVSWV9TRUMQAhIKCgZBTFdBWVMQAyJTCg9QZXJzaXN0ZW5j", + "ZU1vZGUSIAocUEVSU0lTVEVOQ0VfTU9ERV9VTlNQRUNJRklFRBAAEgwKCERJ", + "U0FCTEVEEAESBwoDUkRCEAISBwoDQU9GEAMiIgoKTm9kZUNvbmZpZxIUCgdz", + "aXplX2diGAEgASgBQgPgQQMi7QEKFlpvbmVEaXN0cmlidXRpb25Db25maWcS", + "EQoEem9uZRgCIAEoCUID4EEBEl8KBG1vZGUYASABKA4yTC5nb29nbGUuY2xv", + "dWQubWVtb3J5c3RvcmUudjFiZXRhLlpvbmVEaXN0cmlidXRpb25Db25maWcu", + "Wm9uZURpc3RyaWJ1dGlvbk1vZGVCA+BBASJfChRab25lRGlzdHJpYnV0aW9u", + "TW9kZRImCiJaT05FX0RJU1RSSUJVVElPTl9NT0RFX1VOU1BFQ0lGSUVEEAAS", + "DgoKTVVMVElfWk9ORRABEg8KC1NJTkdMRV9aT05FEAIisAEKFExpc3RJbnN0", + "YW5jZXNSZXF1ZXN0EjsKBnBhcmVudBgBIAEoCUIr4EEC+kElEiNtZW1vcnlz", + "dG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5jZRIWCglwYWdlX3NpemUYAiAB", + "KAVCA+BBARIXCgpwYWdlX3Rva2VuGAMgASgJQgPgQQESEwoGZmlsdGVyGAQg", + "ASgJQgPgQQESFQoIb3JkZXJfYnkYBSABKAlCA+BBASKDAQoVTGlzdEluc3Rh", + "bmNlc1Jlc3BvbnNlEjwKCWluc3RhbmNlcxgBIAMoCzIpLmdvb2dsZS5jbG91", + "ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5zdGFuY2USFwoPbmV4dF9wYWdlX3Rv", + "a2VuGAIgASgJEhMKC3VucmVhY2hhYmxlGAMgAygJIk8KEkdldEluc3RhbmNl", + "UmVxdWVzdBI5CgRuYW1lGAEgASgJQivgQQL6QSUKI21lbW9yeXN0b3JlLmdv", + "b2dsZWFwaXMuY29tL0luc3RhbmNlItEBChVDcmVhdGVJbnN0YW5jZVJlcXVl", + "c3QSOwoGcGFyZW50GAEgASgJQivgQQL6QSUSI21lbW9yeXN0b3JlLmdvb2ds", + "ZWFwaXMuY29tL0luc3RhbmNlEhgKC2luc3RhbmNlX2lkGAIgASgJQgPgQQIS", + "QAoIaW5zdGFuY2UYAyABKAsyKS5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUu", + "djFiZXRhLkluc3RhbmNlQgPgQQISHwoKcmVxdWVzdF9pZBgEIAEoCUIL4EEB", + "4ozP1wgCCAEisAEKFVVwZGF0ZUluc3RhbmNlUmVxdWVzdBI0Cgt1cGRhdGVf", + "bWFzaxgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tCA+BBARJA", + "CghpbnN0YW5jZRgCIAEoCzIpLmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52", + "MWJldGEuSW5zdGFuY2VCA+BBAhIfCgpyZXF1ZXN0X2lkGAMgASgJQgvgQQHi", + "jM/XCAIIASJzChVEZWxldGVJbnN0YW5jZVJlcXVlc3QSOQoEbmFtZRgBIAEo", + "CUIr4EEC+kElCiNtZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5j", + "ZRIfCgpyZXF1ZXN0X2lkGAIgASgJQgvgQQHijM/XCAIIASJbCh5HZXRDZXJ0", + "aWZpY2F0ZUF1dGhvcml0eVJlcXVlc3QSOQoEbmFtZRgBIAEoCUIr4EEC+kEl", + "CiNtZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNvbS9JbnN0YW5jZSKRBAoUQ2Vy", + "dGlmaWNhdGVBdXRob3JpdHkSbgoRbWFuYWdlZF9zZXJ2ZXJfY2EYAiABKAsy", + "US5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRhLkNlcnRpZmljYXRl", + "QXV0aG9yaXR5Lk1hbmFnZWRDZXJ0aWZpY2F0ZUF1dGhvcml0eUgAEhEKBG5h", + "bWUYASABKAlCA+BBCBqvAQobTWFuYWdlZENlcnRpZmljYXRlQXV0aG9yaXR5", + "Em0KCGNhX2NlcnRzGAEgAygLMlsuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0b3Jl", + "LnYxYmV0YS5DZXJ0aWZpY2F0ZUF1dGhvcml0eS5NYW5hZ2VkQ2VydGlmaWNh", + "dGVBdXRob3JpdHkuQ2VydENoYWluGiEKCUNlcnRDaGFpbhIUCgxjZXJ0aWZp", + "Y2F0ZXMYASADKAk6tgHqQbIBCi9tZW1vcnlzdG9yZS5nb29nbGVhcGlzLmNv", + "bS9DZXJ0aWZpY2F0ZUF1dGhvcml0eRJRcHJvamVjdHMve3Byb2plY3R9L2xv", + "Y2F0aW9ucy97bG9jYXRpb259L2luc3RhbmNlcy97aW5zdGFuY2V9L2NlcnRp", + "ZmljYXRlQXV0aG9yaXR5KhZjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzMhRjZXJ0", + "aWZpY2F0ZUF1dGhvcml0eUILCglzZXJ2ZXJfY2EigAIKEU9wZXJhdGlvbk1l", + "dGFkYXRhEjQKC2NyZWF0ZV90aW1lGAEgASgLMhouZ29vZ2xlLnByb3RvYnVm", + "LlRpbWVzdGFtcEID4EEDEjEKCGVuZF90aW1lGAIgASgLMhouZ29vZ2xlLnBy", + "b3RvYnVmLlRpbWVzdGFtcEID4EEDEhMKBnRhcmdldBgDIAEoCUID4EEDEhEK", + "BHZlcmIYBCABKAlCA+BBAxIbCg5zdGF0dXNfbWVzc2FnZRgFIAEoCUID4EED", + "EiMKFnJlcXVlc3RlZF9jYW5jZWxsYXRpb24YBiABKAhCA+BBAxIYCgthcGlf", + "dmVyc2lvbhgHIAEoCUID4EEDKlcKE1BzY0Nvbm5lY3Rpb25TdGF0dXMSJQoh", + "UFNDX0NPTk5FQ1RJT05fU1RBVFVTX1VOU1BFQ0lGSUVEEAASCgoGQUNUSVZF", + "EAESDQoJTk9UX0ZPVU5EEAIqiQEKDkNvbm5lY3Rpb25UeXBlEh8KG0NPTk5F", + "Q1RJT05fVFlQRV9VTlNQRUNJRklFRBAAEh0KGUNPTk5FQ1RJT05fVFlQRV9E", + "SVNDT1ZFUlkQARIbChdDT05ORUNUSU9OX1RZUEVfUFJJTUFSWRACEhoKFkNP", + "Tk5FQ1RJT05fVFlQRV9SRUFERVIQAzL2CgoLTWVtb3J5c3RvcmUSwgEKDUxp", + "c3RJbnN0YW5jZXMSNS5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRh", + "Lkxpc3RJbnN0YW5jZXNSZXF1ZXN0GjYuZ29vZ2xlLmNsb3VkLm1lbW9yeXN0", + "b3JlLnYxYmV0YS5MaXN0SW5zdGFuY2VzUmVzcG9uc2UiQtpBBnBhcmVudILT", + "5JMCMxIxL3YxYmV0YS97cGFyZW50PXByb2plY3RzLyovbG9jYXRpb25zLyp9", + "L2luc3RhbmNlcxKvAQoLR2V0SW5zdGFuY2USMy5nb29nbGUuY2xvdWQubWVt", + "b3J5c3RvcmUudjFiZXRhLkdldEluc3RhbmNlUmVxdWVzdBopLmdvb2dsZS5j", + "bG91ZC5tZW1vcnlzdG9yZS52MWJldGEuSW5zdGFuY2UiQNpBBG5hbWWC0+ST", + "AjMSMS92MWJldGEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9pbnN0", + "YW5jZXMvKn0S6wEKDkNyZWF0ZUluc3RhbmNlEjYuZ29vZ2xlLmNsb3VkLm1l", + "bW9yeXN0b3JlLnYxYmV0YS5DcmVhdGVJbnN0YW5jZVJlcXVlc3QaHS5nb29n", + "bGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9uIoEBykEdCghJbnN0YW5jZRIRT3Bl", + "cmF0aW9uTWV0YWRhdGHaQRtwYXJlbnQsaW5zdGFuY2UsaW5zdGFuY2VfaWSC", + "0+STAj0iMS92MWJldGEve3BhcmVudD1wcm9qZWN0cy8qL2xvY2F0aW9ucy8q", + "fS9pbnN0YW5jZXM6CGluc3RhbmNlEu0BCg5VcGRhdGVJbnN0YW5jZRI2Lmdv", + "b2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEuVXBkYXRlSW5zdGFuY2VS", + "ZXF1ZXN0Gh0uZ29vZ2xlLmxvbmdydW5uaW5nLk9wZXJhdGlvbiKDAcpBHQoI", + "SW5zdGFuY2USEU9wZXJhdGlvbk1ldGFkYXRh2kEUaW5zdGFuY2UsdXBkYXRl", + "X21hc2uC0+STAkYyOi92MWJldGEve2luc3RhbmNlLm5hbWU9cHJvamVjdHMv", + "Ki9sb2NhdGlvbnMvKi9pbnN0YW5jZXMvKn06CGluc3RhbmNlEtYBCg5EZWxl", + "dGVJbnN0YW5jZRI2Lmdvb2dsZS5jbG91ZC5tZW1vcnlzdG9yZS52MWJldGEu", + "RGVsZXRlSW5zdGFuY2VSZXF1ZXN0Gh0uZ29vZ2xlLmxvbmdydW5uaW5nLk9w", + "ZXJhdGlvbiJtykEqChVnb29nbGUucHJvdG9idWYuRW1wdHkSEU9wZXJhdGlv", + "bk1ldGFkYXRh2kEEbmFtZYLT5JMCMyoxL3YxYmV0YS97bmFtZT1wcm9qZWN0", + "cy8qL2xvY2F0aW9ucy8qL2luc3RhbmNlcy8qfRLoAQoXR2V0Q2VydGlmaWNh", + "dGVBdXRob3JpdHkSPy5nb29nbGUuY2xvdWQubWVtb3J5c3RvcmUudjFiZXRh", + "LkdldENlcnRpZmljYXRlQXV0aG9yaXR5UmVxdWVzdBo1Lmdvb2dsZS5jbG91", + "ZC5tZW1vcnlzdG9yZS52MWJldGEuQ2VydGlmaWNhdGVBdXRob3JpdHkiVdpB", + "BG5hbWWC0+STAkgSRi92MWJldGEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlv", + "bnMvKi9pbnN0YW5jZXMvKn0vY2VydGlmaWNhdGVBdXRob3JpdHkaTspBGm1l", + "bW9yeXN0b3JlLmdvb2dsZWFwaXMuY29t0kEuaHR0cHM6Ly93d3cuZ29vZ2xl", + "YXBpcy5jb20vYXV0aC9jbG91ZC1wbGF0Zm9ybUKgBAojY29tLmdvb2dsZS5j", + "bG91ZC5tZW1vcnlzdG9yZS52MWJldGFCC1YxbWFpblByb3RvUAFaRWNsb3Vk", + "Lmdvb2dsZS5jb20vZ28vbWVtb3J5c3RvcmUvYXBpdjFiZXRhL21lbW9yeXN0", + "b3JlcGI7bWVtb3J5c3RvcmVwYqoCH0dvb2dsZS5DbG91ZC5NZW1vcnlzdG9y", + "ZS5WMUJldGHKAh9Hb29nbGVcQ2xvdWRcTWVtb3J5c3RvcmVcVjFiZXRh6gIi", + "R29vZ2xlOjpDbG91ZDo6TWVtb3J5c3RvcmU6OlYxYmV0YepBbgolY29tcHV0", + "ZS5nb29nbGVhcGlzLmNvbS9Gb3J3YXJkaW5nUnVsZRJFcHJvamVjdHMve3By", + "b2plY3R9L3JlZ2lvbnMve3JlZ2lvbn0vZm9yd2FyZGluZ1J1bGVzL3tmb3J3", + "YXJkaW5nX3J1bGV96kFOCh5jb21wdXRlLmdvb2dsZWFwaXMuY29tL05ldHdv", + "cmsSLHByb2plY3RzL3twcm9qZWN0fS9nbG9iYWwvbmV0d29ya3Mve25ldHdv", + "cmt96kF3Cihjb21wdXRlLmdvb2dsZWFwaXMuY29tL1NlcnZpY2VBdHRhY2ht", + "ZW50Ektwcm9qZWN0cy97cHJvamVjdH0vcmVnaW9ucy97cmVnaW9ufS9zZXJ2", + "aWNlQXR0YWNobWVudHMve3NlcnZpY2VfYXR0YWNobWVudH1iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.FieldInfoReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus), typeof(global::Google.Cloud.Memorystore.V1Beta.ConnectionType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.Instance), global::Google.Cloud.Memorystore.V1Beta.Instance.Parser, new[]{ "Name", "CreateTime", "UpdateTime", "Labels", "State", "StateInfo", "Uid", "ReplicaCount", "AuthorizationMode", "TransitEncryptionMode", "ShardCount", "DiscoveryEndpoints", "NodeType", "PersistenceConfig", "EngineVersion", "EngineConfigs", "NodeConfig", "ZoneDistributionConfig", "DeletionProtectionEnabled", "PscAutoConnections", "Endpoints", "Mode" }, new[]{ "ReplicaCount", "DeletionProtectionEnabled" }, new[]{ typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State), typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode), typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode), typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType), typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo), global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Parser, new[]{ "UpdateInfo" }, new[]{ "Info" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo), global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo.Parser, new[]{ "TargetShardCount", "TargetReplicaCount" }, new[]{ "TargetShardCount", "TargetReplicaCount" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.InstanceEndpoint), global::Google.Cloud.Memorystore.V1Beta.Instance.Types.InstanceEndpoint.Parser, new[]{ "Connections" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.Instance.Types.ConnectionDetail), global::Google.Cloud.Memorystore.V1Beta.Instance.Types.ConnectionDetail.Parser, new[]{ "PscAutoConnection", "PscConnection" }, new[]{ "Connection" }, null, null, null), + null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection), global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection.Parser, new[]{ "Port", "PscConnectionId", "IpAddress", "ForwardingRule", "ProjectId", "Network", "ServiceAttachment", "PscConnectionStatus", "ConnectionType" }, new[]{ "Ports" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.PscConnection), global::Google.Cloud.Memorystore.V1Beta.PscConnection.Parser, new[]{ "PscConnectionId", "IpAddress", "ForwardingRule", "ProjectId", "Network", "ServiceAttachment", "PscConnectionStatus", "ConnectionType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.DiscoveryEndpoint), global::Google.Cloud.Memorystore.V1Beta.DiscoveryEndpoint.Parser, new[]{ "Address", "Port", "Network" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig), global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Parser, new[]{ "Mode", "RdbConfig", "AofConfig" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig), global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Parser, new[]{ "RdbSnapshotPeriod", "RdbSnapshotStartTime" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig), global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Parser, new[]{ "AppendFsync" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) }, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.NodeConfig), global::Google.Cloud.Memorystore.V1Beta.NodeConfig.Parser, new[]{ "SizeGb" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig), global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Parser, new[]{ "Zone", "Mode" }, null, new[]{ typeof(global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest), global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter", "OrderBy" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.ListInstancesResponse), global::Google.Cloud.Memorystore.V1Beta.ListInstancesResponse.Parser, new[]{ "Instances", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest), global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest), global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest.Parser, new[]{ "Parent", "InstanceId", "Instance", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest), global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest.Parser, new[]{ "UpdateMask", "Instance", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest), global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest.Parser, new[]{ "Name", "RequestId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest), global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority), global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Parser, new[]{ "ManagedServerCa", "Name" }, new[]{ "ServerCa" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority), global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority.Parser, new[]{ "CaCerts" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain), global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain.Parser, new[]{ "Certificates" }, null, null, null, null)})}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Memorystore.V1Beta.OperationMetadata), global::Google.Cloud.Memorystore.V1Beta.OperationMetadata.Parser, new[]{ "CreateTime", "EndTime", "Target", "Verb", "StatusMessage", "RequestedCancellation", "ApiVersion" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Status of the PSC connection. + /// + public enum PscConnectionStatus { + /// + /// PSC connection status is not specified. + /// + [pbr::OriginalName("PSC_CONNECTION_STATUS_UNSPECIFIED")] Unspecified = 0, + /// + /// The connection is active + /// + [pbr::OriginalName("ACTIVE")] Active = 1, + /// + /// Connection not found + /// + [pbr::OriginalName("NOT_FOUND")] NotFound = 2, + } + + /// + /// Type of a PSC connection + /// + public enum ConnectionType { + /// + /// Connection Type is not set + /// + [pbr::OriginalName("CONNECTION_TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Connection that will be used for topology discovery. + /// + [pbr::OriginalName("CONNECTION_TYPE_DISCOVERY")] Discovery = 1, + /// + /// Connection that will be used as primary endpoint to access primary. + /// + [pbr::OriginalName("CONNECTION_TYPE_PRIMARY")] Primary = 2, + /// + /// Connection that will be used as reader endpoint to access replicas. + /// + [pbr::OriginalName("CONNECTION_TYPE_READER")] Reader = 3, + } + + #endregion + + #region Messages + /// + /// A Memorystore instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Instance : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Instance()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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.Memorystore.V1Beta.MemorystoreReflection.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 Instance() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance(Instance other) : this() { + _hasBits0 = other._hasBits0; + name_ = other.name_; + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + updateTime_ = other.updateTime_ != null ? other.updateTime_.Clone() : null; + labels_ = other.labels_.Clone(); + state_ = other.state_; + stateInfo_ = other.stateInfo_ != null ? other.stateInfo_.Clone() : null; + uid_ = other.uid_; + replicaCount_ = other.replicaCount_; + authorizationMode_ = other.authorizationMode_; + transitEncryptionMode_ = other.transitEncryptionMode_; + shardCount_ = other.shardCount_; + discoveryEndpoints_ = other.discoveryEndpoints_.Clone(); + nodeType_ = other.nodeType_; + persistenceConfig_ = other.persistenceConfig_ != null ? other.persistenceConfig_.Clone() : null; + engineVersion_ = other.engineVersion_; + engineConfigs_ = other.engineConfigs_.Clone(); + nodeConfig_ = other.nodeConfig_ != null ? other.nodeConfig_.Clone() : null; + zoneDistributionConfig_ = other.zoneDistributionConfig_ != null ? other.zoneDistributionConfig_.Clone() : null; + deletionProtectionEnabled_ = other.deletionProtectionEnabled_; + pscAutoConnections_ = other.pscAutoConnections_.Clone(); + endpoints_ = other.endpoints_.Clone(); + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Instance Clone() { + return new Instance(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. Unique name of the instance. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 "create_time" field. + public const int CreateTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. Creation timestamp of the instance. + /// + [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 "update_time" field. + public const int UpdateTimeFieldNumber = 3; + private global::Google.Protobuf.WellKnownTypes.Timestamp updateTime_; + /// + /// Output only. Latest update timestamp of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp UpdateTime { + get { return updateTime_; } + set { + updateTime_ = value; + } + } + + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 34); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// Optional. Labels to represent user-provided metadata. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 5; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State state_ = global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified; + /// + /// Output only. Current state of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State State { + get { return state_; } + set { + state_ = value; + } + } + + /// Field number for the "state_info" field. + public const int StateInfoFieldNumber = 6; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo stateInfo_; + /// + /// Output only. Additional information about the state of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo StateInfo { + get { return stateInfo_; } + set { + stateInfo_ = value; + } + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 7; + private string uid_ = ""; + /// + /// Output only. System assigned, unique identifier for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "replica_count" field. + public const int ReplicaCountFieldNumber = 8; + private readonly static int ReplicaCountDefaultValue = 0; + + private int replicaCount_; + /// + /// Optional. Number of replica nodes per shard. If omitted the default is 0 + /// replicas. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ReplicaCount { + get { if ((_hasBits0 & 1) != 0) { return replicaCount_; } else { return ReplicaCountDefaultValue; } } + set { + _hasBits0 |= 1; + replicaCount_ = value; + } + } + /// Gets whether the "replica_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasReplicaCount { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "replica_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearReplicaCount() { + _hasBits0 &= ~1; + } + + /// Field number for the "authorization_mode" field. + public const int AuthorizationModeFieldNumber = 9; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode authorizationMode_ = global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified; + /// + /// Optional. Immutable. Authorization mode of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode AuthorizationMode { + get { return authorizationMode_; } + set { + authorizationMode_ = value; + } + } + + /// Field number for the "transit_encryption_mode" field. + public const int TransitEncryptionModeFieldNumber = 10; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode transitEncryptionMode_ = global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified; + /// + /// Optional. Immutable. In-transit encryption mode of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode TransitEncryptionMode { + get { return transitEncryptionMode_; } + set { + transitEncryptionMode_ = value; + } + } + + /// Field number for the "shard_count" field. + public const int ShardCountFieldNumber = 11; + private int shardCount_; + /// + /// Optional. Number of shards for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ShardCount { + get { return shardCount_; } + set { + shardCount_ = value; + } + } + + /// Field number for the "discovery_endpoints" field. + public const int DiscoveryEndpointsFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_discoveryEndpoints_codec + = pb::FieldCodec.ForMessage(98, global::Google.Cloud.Memorystore.V1Beta.DiscoveryEndpoint.Parser); + private readonly pbc::RepeatedField discoveryEndpoints_ = new pbc::RepeatedField(); + /// + /// Output only. Endpoints clients can connect to the instance through. + /// Currently only one discovery endpoint is supported. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DiscoveryEndpoints { + get { return discoveryEndpoints_; } + } + + /// Field number for the "node_type" field. + public const int NodeTypeFieldNumber = 13; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType nodeType_ = global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified; + /// + /// Optional. Immutable. Machine type for individual nodes of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType NodeType { + get { return nodeType_; } + set { + nodeType_ = value; + } + } + + /// Field number for the "persistence_config" field. + public const int PersistenceConfigFieldNumber = 14; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig persistenceConfig_; + /// + /// Optional. Persistence configuration of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig PersistenceConfig { + get { return persistenceConfig_; } + set { + persistenceConfig_ = value; + } + } + + /// Field number for the "engine_version" field. + public const int EngineVersionFieldNumber = 15; + private string engineVersion_ = ""; + /// + /// Optional. Immutable. Engine version of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EngineVersion { + get { return engineVersion_; } + set { + engineVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "engine_configs" field. + public const int EngineConfigsFieldNumber = 16; + private static readonly pbc::MapField.Codec _map_engineConfigs_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 130); + private readonly pbc::MapField engineConfigs_ = new pbc::MapField(); + /// + /// Optional. User-provided engine configurations for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField EngineConfigs { + get { return engineConfigs_; } + } + + /// Field number for the "node_config" field. + public const int NodeConfigFieldNumber = 17; + private global::Google.Cloud.Memorystore.V1Beta.NodeConfig nodeConfig_; + /// + /// Output only. Configuration of individual nodes of the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.NodeConfig NodeConfig { + get { return nodeConfig_; } + set { + nodeConfig_ = value; + } + } + + /// Field number for the "zone_distribution_config" field. + public const int ZoneDistributionConfigFieldNumber = 18; + private global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig zoneDistributionConfig_; + /// + /// Optional. Immutable. Zone distribution configuration of the instance for + /// node allocation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig ZoneDistributionConfig { + get { return zoneDistributionConfig_; } + set { + zoneDistributionConfig_ = value; + } + } + + /// Field number for the "deletion_protection_enabled" field. + public const int DeletionProtectionEnabledFieldNumber = 19; + private readonly static bool DeletionProtectionEnabledDefaultValue = false; + + private bool deletionProtectionEnabled_; + /// + /// Optional. If set to true deletion of the instance will fail. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeletionProtectionEnabled { + get { if ((_hasBits0 & 2) != 0) { return deletionProtectionEnabled_; } else { return DeletionProtectionEnabledDefaultValue; } } + set { + _hasBits0 |= 2; + deletionProtectionEnabled_ = value; + } + } + /// Gets whether the "deletion_protection_enabled" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeletionProtectionEnabled { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "deletion_protection_enabled" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeletionProtectionEnabled() { + _hasBits0 &= ~2; + } + + /// Field number for the "psc_auto_connections" field. + public const int PscAutoConnectionsFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_pscAutoConnections_codec + = pb::FieldCodec.ForMessage(162, global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection.Parser); + private readonly pbc::RepeatedField pscAutoConnections_ = new pbc::RepeatedField(); + /// + /// Required. Immutable. User inputs and resource details of the auto-created + /// PSC connections. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PscAutoConnections { + get { return pscAutoConnections_; } + } + + /// Field number for the "endpoints" field. + public const int EndpointsFieldNumber = 25; + private static readonly pb::FieldCodec _repeated_endpoints_codec + = pb::FieldCodec.ForMessage(202, global::Google.Cloud.Memorystore.V1Beta.Instance.Types.InstanceEndpoint.Parser); + private readonly pbc::RepeatedField endpoints_ = new pbc::RepeatedField(); + /// + /// Optional. Endpoints for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Endpoints { + get { return endpoints_; } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 26; + private global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode mode_ = global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified; + /// + /// Optional. The mode config for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Instance); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Instance other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(UpdateTime, other.UpdateTime)) return false; + if (!Labels.Equals(other.Labels)) return false; + if (State != other.State) return false; + if (!object.Equals(StateInfo, other.StateInfo)) return false; + if (Uid != other.Uid) return false; + if (ReplicaCount != other.ReplicaCount) return false; + if (AuthorizationMode != other.AuthorizationMode) return false; + if (TransitEncryptionMode != other.TransitEncryptionMode) return false; + if (ShardCount != other.ShardCount) return false; + if(!discoveryEndpoints_.Equals(other.discoveryEndpoints_)) return false; + if (NodeType != other.NodeType) return false; + if (!object.Equals(PersistenceConfig, other.PersistenceConfig)) return false; + if (EngineVersion != other.EngineVersion) return false; + if (!EngineConfigs.Equals(other.EngineConfigs)) return false; + if (!object.Equals(NodeConfig, other.NodeConfig)) return false; + if (!object.Equals(ZoneDistributionConfig, other.ZoneDistributionConfig)) return false; + if (DeletionProtectionEnabled != other.DeletionProtectionEnabled) return false; + if(!pscAutoConnections_.Equals(other.pscAutoConnections_)) return false; + if(!endpoints_.Equals(other.endpoints_)) return false; + if (Mode != other.Mode) 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 (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (updateTime_ != null) hash ^= UpdateTime.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (State != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified) hash ^= State.GetHashCode(); + if (stateInfo_ != null) hash ^= StateInfo.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (HasReplicaCount) hash ^= ReplicaCount.GetHashCode(); + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified) hash ^= AuthorizationMode.GetHashCode(); + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified) hash ^= TransitEncryptionMode.GetHashCode(); + if (ShardCount != 0) hash ^= ShardCount.GetHashCode(); + hash ^= discoveryEndpoints_.GetHashCode(); + if (NodeType != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified) hash ^= NodeType.GetHashCode(); + if (persistenceConfig_ != null) hash ^= PersistenceConfig.GetHashCode(); + if (EngineVersion.Length != 0) hash ^= EngineVersion.GetHashCode(); + hash ^= EngineConfigs.GetHashCode(); + if (nodeConfig_ != null) hash ^= NodeConfig.GetHashCode(); + if (zoneDistributionConfig_ != null) hash ^= ZoneDistributionConfig.GetHashCode(); + if (HasDeletionProtectionEnabled) hash ^= DeletionProtectionEnabled.GetHashCode(); + hash ^= pscAutoConnections_.GetHashCode(); + hash ^= endpoints_.GetHashCode(); + if (Mode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified) hash ^= Mode.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 (createTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UpdateTime); + } + labels_.WriteTo(output, _map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) State); + } + if (stateInfo_ != null) { + output.WriteRawTag(50); + output.WriteMessage(StateInfo); + } + if (Uid.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Uid); + } + if (HasReplicaCount) { + output.WriteRawTag(64); + output.WriteInt32(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified) { + output.WriteRawTag(72); + output.WriteEnum((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified) { + output.WriteRawTag(80); + output.WriteEnum((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + output.WriteRawTag(88); + output.WriteInt32(ShardCount); + } + discoveryEndpoints_.WriteTo(output, _repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified) { + output.WriteRawTag(104); + output.WriteEnum((int) NodeType); + } + if (persistenceConfig_ != null) { + output.WriteRawTag(114); + output.WriteMessage(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + output.WriteRawTag(122); + output.WriteString(EngineVersion); + } + engineConfigs_.WriteTo(output, _map_engineConfigs_codec); + if (nodeConfig_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + output.WriteRawTag(152, 1); + output.WriteBool(DeletionProtectionEnabled); + } + pscAutoConnections_.WriteTo(output, _repeated_pscAutoConnections_codec); + endpoints_.WriteTo(output, _repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified) { + output.WriteRawTag(208, 1); + output.WriteEnum((int) Mode); + } + 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 (createTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UpdateTime); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified) { + output.WriteRawTag(40); + output.WriteEnum((int) State); + } + if (stateInfo_ != null) { + output.WriteRawTag(50); + output.WriteMessage(StateInfo); + } + if (Uid.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Uid); + } + if (HasReplicaCount) { + output.WriteRawTag(64); + output.WriteInt32(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified) { + output.WriteRawTag(72); + output.WriteEnum((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified) { + output.WriteRawTag(80); + output.WriteEnum((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + output.WriteRawTag(88); + output.WriteInt32(ShardCount); + } + discoveryEndpoints_.WriteTo(ref output, _repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified) { + output.WriteRawTag(104); + output.WriteEnum((int) NodeType); + } + if (persistenceConfig_ != null) { + output.WriteRawTag(114); + output.WriteMessage(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + output.WriteRawTag(122); + output.WriteString(EngineVersion); + } + engineConfigs_.WriteTo(ref output, _map_engineConfigs_codec); + if (nodeConfig_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + output.WriteRawTag(152, 1); + output.WriteBool(DeletionProtectionEnabled); + } + pscAutoConnections_.WriteTo(ref output, _repeated_pscAutoConnections_codec); + endpoints_.WriteTo(ref output, _repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified) { + output.WriteRawTag(208, 1); + output.WriteEnum((int) Mode); + } + 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 (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (updateTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateTime); + } + size += labels_.CalculateSize(_map_labels_codec); + if (State != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + if (stateInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StateInfo); + } + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid); + } + if (HasReplicaCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReplicaCount); + } + if (AuthorizationMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AuthorizationMode); + } + if (TransitEncryptionMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TransitEncryptionMode); + } + if (ShardCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ShardCount); + } + size += discoveryEndpoints_.CalculateSize(_repeated_discoveryEndpoints_codec); + if (NodeType != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NodeType); + } + if (persistenceConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PersistenceConfig); + } + if (EngineVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EngineVersion); + } + size += engineConfigs_.CalculateSize(_map_engineConfigs_codec); + if (nodeConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(NodeConfig); + } + if (zoneDistributionConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ZoneDistributionConfig); + } + if (HasDeletionProtectionEnabled) { + size += 2 + 1; + } + size += pscAutoConnections_.CalculateSize(_repeated_pscAutoConnections_codec); + size += endpoints_.CalculateSize(_repeated_endpoints_codec); + if (Mode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Instance other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.updateTime_ != null) { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + UpdateTime.MergeFrom(other.UpdateTime); + } + labels_.MergeFrom(other.labels_); + if (other.State != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State.Unspecified) { + State = other.State; + } + if (other.stateInfo_ != null) { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo(); + } + StateInfo.MergeFrom(other.StateInfo); + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.HasReplicaCount) { + ReplicaCount = other.ReplicaCount; + } + if (other.AuthorizationMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode.Unspecified) { + AuthorizationMode = other.AuthorizationMode; + } + if (other.TransitEncryptionMode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode.Unspecified) { + TransitEncryptionMode = other.TransitEncryptionMode; + } + if (other.ShardCount != 0) { + ShardCount = other.ShardCount; + } + discoveryEndpoints_.Add(other.discoveryEndpoints_); + if (other.NodeType != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType.Unspecified) { + NodeType = other.NodeType; + } + if (other.persistenceConfig_ != null) { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig(); + } + PersistenceConfig.MergeFrom(other.PersistenceConfig); + } + if (other.EngineVersion.Length != 0) { + EngineVersion = other.EngineVersion; + } + engineConfigs_.MergeFrom(other.engineConfigs_); + if (other.nodeConfig_ != null) { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1Beta.NodeConfig(); + } + NodeConfig.MergeFrom(other.NodeConfig); + } + if (other.zoneDistributionConfig_ != null) { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig(); + } + ZoneDistributionConfig.MergeFrom(other.ZoneDistributionConfig); + } + if (other.HasDeletionProtectionEnabled) { + DeletionProtectionEnabled = other.DeletionProtectionEnabled; + } + pscAutoConnections_.Add(other.pscAutoConnections_); + endpoints_.Add(other.endpoints_); + if (other.Mode != global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode.Unspecified) { + Mode = other.Mode; + } + _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 (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 26: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 34: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 40: { + State = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State) input.ReadEnum(); + break; + } + case 50: { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo(); + } + input.ReadMessage(StateInfo); + break; + } + case 58: { + Uid = input.ReadString(); + break; + } + case 64: { + ReplicaCount = input.ReadInt32(); + break; + } + case 72: { + AuthorizationMode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode) input.ReadEnum(); + break; + } + case 80: { + TransitEncryptionMode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode) input.ReadEnum(); + break; + } + case 88: { + ShardCount = input.ReadInt32(); + break; + } + case 98: { + discoveryEndpoints_.AddEntriesFrom(input, _repeated_discoveryEndpoints_codec); + break; + } + case 104: { + NodeType = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType) input.ReadEnum(); + break; + } + case 114: { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig(); + } + input.ReadMessage(PersistenceConfig); + break; + } + case 122: { + EngineVersion = input.ReadString(); + break; + } + case 130: { + engineConfigs_.AddEntriesFrom(input, _map_engineConfigs_codec); + break; + } + case 138: { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1Beta.NodeConfig(); + } + input.ReadMessage(NodeConfig); + break; + } + case 146: { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig(); + } + input.ReadMessage(ZoneDistributionConfig); + break; + } + case 152: { + DeletionProtectionEnabled = input.ReadBool(); + break; + } + case 162: { + pscAutoConnections_.AddEntriesFrom(input, _repeated_pscAutoConnections_codec); + break; + } + case 202: { + endpoints_.AddEntriesFrom(input, _repeated_endpoints_codec); + break; + } + case 208: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode) 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: { + Name = input.ReadString(); + break; + } + case 18: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 26: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 34: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 40: { + State = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.State) input.ReadEnum(); + break; + } + case 50: { + if (stateInfo_ == null) { + StateInfo = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo(); + } + input.ReadMessage(StateInfo); + break; + } + case 58: { + Uid = input.ReadString(); + break; + } + case 64: { + ReplicaCount = input.ReadInt32(); + break; + } + case 72: { + AuthorizationMode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.AuthorizationMode) input.ReadEnum(); + break; + } + case 80: { + TransitEncryptionMode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.TransitEncryptionMode) input.ReadEnum(); + break; + } + case 88: { + ShardCount = input.ReadInt32(); + break; + } + case 98: { + discoveryEndpoints_.AddEntriesFrom(ref input, _repeated_discoveryEndpoints_codec); + break; + } + case 104: { + NodeType = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.NodeType) input.ReadEnum(); + break; + } + case 114: { + if (persistenceConfig_ == null) { + PersistenceConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig(); + } + input.ReadMessage(PersistenceConfig); + break; + } + case 122: { + EngineVersion = input.ReadString(); + break; + } + case 130: { + engineConfigs_.AddEntriesFrom(ref input, _map_engineConfigs_codec); + break; + } + case 138: { + if (nodeConfig_ == null) { + NodeConfig = new global::Google.Cloud.Memorystore.V1Beta.NodeConfig(); + } + input.ReadMessage(NodeConfig); + break; + } + case 146: { + if (zoneDistributionConfig_ == null) { + ZoneDistributionConfig = new global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig(); + } + input.ReadMessage(ZoneDistributionConfig); + break; + } + case 152: { + DeletionProtectionEnabled = input.ReadBool(); + break; + } + case 162: { + pscAutoConnections_.AddEntriesFrom(ref input, _repeated_pscAutoConnections_codec); + break; + } + case 202: { + endpoints_.AddEntriesFrom(ref input, _repeated_endpoints_codec); + break; + } + case 208: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Instance message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible states of the instance. + /// + public enum State { + /// + /// Not set. + /// + [pbr::OriginalName("STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// Instance is being created. + /// + [pbr::OriginalName("CREATING")] Creating = 1, + /// + /// Instance has been created and is usable. + /// + [pbr::OriginalName("ACTIVE")] Active = 2, + /// + /// Instance is being updated. + /// + [pbr::OriginalName("UPDATING")] Updating = 3, + /// + /// Instance is being deleted. + /// + [pbr::OriginalName("DELETING")] Deleting = 4, + } + + /// + /// Possible authorization modes of the instance. + /// + public enum AuthorizationMode { + /// + /// Not set. + /// + [pbr::OriginalName("AUTHORIZATION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Authorization disabled. + /// + [pbr::OriginalName("AUTH_DISABLED")] AuthDisabled = 1, + /// + /// IAM basic authorization. + /// + [pbr::OriginalName("IAM_AUTH")] IamAuth = 2, + } + + /// + /// Possible in-transit encryption modes of the instance. + /// + public enum TransitEncryptionMode { + /// + /// Not set. + /// + [pbr::OriginalName("TRANSIT_ENCRYPTION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// In-transit encryption is disabled. + /// + [pbr::OriginalName("TRANSIT_ENCRYPTION_DISABLED")] TransitEncryptionDisabled = 1, + /// + /// Server-managed encryption is used for in-transit encryption. + /// + [pbr::OriginalName("SERVER_AUTHENTICATION")] ServerAuthentication = 2, + } + + /// + /// Possible node types of the instance. See + /// https://cloud.google.com/memorystore/docs/valkey/instance-node-specification + /// for more information. + /// + public enum NodeType { + /// + /// Not set. + /// + [pbr::OriginalName("NODE_TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Shared core nano. + /// + [pbr::OriginalName("SHARED_CORE_NANO")] SharedCoreNano = 1, + /// + /// High memory medium. + /// + [pbr::OriginalName("HIGHMEM_MEDIUM")] HighmemMedium = 2, + /// + /// High memory extra large. + /// + [pbr::OriginalName("HIGHMEM_XLARGE")] HighmemXlarge = 3, + /// + /// Standard small. + /// + [pbr::OriginalName("STANDARD_SMALL")] StandardSmall = 4, + } + + /// + /// The mode config, which is used to enable/disable cluster mode. + /// + public enum Mode { + /// + /// Mode is not specified. + /// + [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Instance is in standalone mode. + /// + [pbr::OriginalName("STANDALONE")] Standalone = 1, + /// + /// Instance is in cluster mode. + /// + [pbr::OriginalName("CLUSTER")] Cluster = 2, + } + + /// + /// Additional information about the state of the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StateInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StateInfo()); + 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.Memorystore.V1Beta.Instance.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 StateInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StateInfo(StateInfo other) : this() { + switch (other.InfoCase) { + case InfoOneofCase.UpdateInfo: + UpdateInfo = other.UpdateInfo.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StateInfo Clone() { + return new StateInfo(this); + } + + /// Field number for the "update_info" field. + public const int UpdateInfoFieldNumber = 1; + /// + /// Output only. Describes ongoing update when instance state is UPDATING. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo UpdateInfo { + get { return infoCase_ == InfoOneofCase.UpdateInfo ? (global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo) info_ : null; } + set { + info_ = value; + infoCase_ = value == null ? InfoOneofCase.None : InfoOneofCase.UpdateInfo; + } + } + + private object info_; + /// Enum of possible cases for the "info" oneof. + public enum InfoOneofCase { + None = 0, + UpdateInfo = 1, + } + private InfoOneofCase infoCase_ = InfoOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InfoOneofCase InfoCase { + get { return infoCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInfo() { + infoCase_ = InfoOneofCase.None; + info_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StateInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StateInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(UpdateInfo, other.UpdateInfo)) return false; + if (InfoCase != other.InfoCase) 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 (infoCase_ == InfoOneofCase.UpdateInfo) hash ^= UpdateInfo.GetHashCode(); + hash ^= (int) infoCase_; + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + output.WriteRawTag(10); + output.WriteMessage(UpdateInfo); + } + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + output.WriteRawTag(10); + output.WriteMessage(UpdateInfo); + } + 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 (infoCase_ == InfoOneofCase.UpdateInfo) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateInfo); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StateInfo other) { + if (other == null) { + return; + } + switch (other.InfoCase) { + case InfoOneofCase.UpdateInfo: + if (UpdateInfo == null) { + UpdateInfo = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo(); + } + UpdateInfo.MergeFrom(other.UpdateInfo); + 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.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo subBuilder = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo(); + if (infoCase_ == InfoOneofCase.UpdateInfo) { + subBuilder.MergeFrom(UpdateInfo); + } + input.ReadMessage(subBuilder); + UpdateInfo = 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.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo subBuilder = new global::Google.Cloud.Memorystore.V1Beta.Instance.Types.StateInfo.Types.UpdateInfo(); + if (infoCase_ == InfoOneofCase.UpdateInfo) { + subBuilder.MergeFrom(UpdateInfo); + } + input.ReadMessage(subBuilder); + UpdateInfo = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the StateInfo message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Represents information about instance with state UPDATING. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateInfo()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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.Memorystore.V1Beta.Instance.Types.StateInfo.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 UpdateInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInfo(UpdateInfo other) : this() { + _hasBits0 = other._hasBits0; + targetShardCount_ = other.targetShardCount_; + targetReplicaCount_ = other.targetReplicaCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInfo Clone() { + return new UpdateInfo(this); + } + + /// Field number for the "target_shard_count" field. + public const int TargetShardCountFieldNumber = 1; + private readonly static int TargetShardCountDefaultValue = 0; + + private int targetShardCount_; + /// + /// Output only. Target number of shards for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TargetShardCount { + get { if ((_hasBits0 & 1) != 0) { return targetShardCount_; } else { return TargetShardCountDefaultValue; } } + set { + _hasBits0 |= 1; + targetShardCount_ = value; + } + } + /// Gets whether the "target_shard_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTargetShardCount { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "target_shard_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTargetShardCount() { + _hasBits0 &= ~1; + } + + /// Field number for the "target_replica_count" field. + public const int TargetReplicaCountFieldNumber = 2; + private readonly static int TargetReplicaCountDefaultValue = 0; + + private int targetReplicaCount_; + /// + /// Output only. Target number of replica nodes per shard for the instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TargetReplicaCount { + get { if ((_hasBits0 & 2) != 0) { return targetReplicaCount_; } else { return TargetReplicaCountDefaultValue; } } + set { + _hasBits0 |= 2; + targetReplicaCount_ = value; + } + } + /// Gets whether the "target_replica_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTargetReplicaCount { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "target_replica_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTargetReplicaCount() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TargetShardCount != other.TargetShardCount) return false; + if (TargetReplicaCount != other.TargetReplicaCount) 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 (HasTargetShardCount) hash ^= TargetShardCount.GetHashCode(); + if (HasTargetReplicaCount) hash ^= TargetReplicaCount.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 (HasTargetShardCount) { + output.WriteRawTag(8); + output.WriteInt32(TargetShardCount); + } + if (HasTargetReplicaCount) { + output.WriteRawTag(16); + output.WriteInt32(TargetReplicaCount); + } + 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 (HasTargetShardCount) { + output.WriteRawTag(8); + output.WriteInt32(TargetShardCount); + } + if (HasTargetReplicaCount) { + output.WriteRawTag(16); + output.WriteInt32(TargetReplicaCount); + } + 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 (HasTargetShardCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetShardCount); + } + if (HasTargetReplicaCount) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetReplicaCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateInfo other) { + if (other == null) { + return; + } + if (other.HasTargetShardCount) { + TargetShardCount = other.TargetShardCount; + } + if (other.HasTargetReplicaCount) { + TargetReplicaCount = other.TargetReplicaCount; + } + _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: { + TargetShardCount = input.ReadInt32(); + break; + } + case 16: { + TargetReplicaCount = 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 8: { + TargetShardCount = input.ReadInt32(); + break; + } + case 16: { + TargetReplicaCount = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// InstanceEndpoint consists of PSC connections that are created + /// as a group in each VPC network for accessing the instance. In each group, + /// there shall be one connection for each service attachment in the cluster. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InstanceEndpoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InstanceEndpoint()); + 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.Memorystore.V1Beta.Instance.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 InstanceEndpoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceEndpoint(InstanceEndpoint other) : this() { + connections_ = other.connections_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InstanceEndpoint Clone() { + return new InstanceEndpoint(this); + } + + /// Field number for the "connections" field. + public const int ConnectionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_connections_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1Beta.Instance.Types.ConnectionDetail.Parser); + private readonly pbc::RepeatedField connections_ = new pbc::RepeatedField(); + /// + /// Optional. A group of PSC connections. They are created in the same VPC + /// network, one for each service attachment in the cluster. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Connections { + get { return connections_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InstanceEndpoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InstanceEndpoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!connections_.Equals(other.connections_)) 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 ^= connections_.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 + connections_.WriteTo(output, _repeated_connections_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) { + connections_.WriteTo(ref output, _repeated_connections_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 += connections_.CalculateSize(_repeated_connections_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InstanceEndpoint other) { + if (other == null) { + return; + } + connections_.Add(other.connections_); + _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: { + connections_.AddEntriesFrom(input, _repeated_connections_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: { + connections_.AddEntriesFrom(ref input, _repeated_connections_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Information of each PSC connection. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConnectionDetail : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConnectionDetail()); + 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.Memorystore.V1Beta.Instance.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 ConnectionDetail() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionDetail(ConnectionDetail other) : this() { + switch (other.ConnectionCase) { + case ConnectionOneofCase.PscAutoConnection: + PscAutoConnection = other.PscAutoConnection.Clone(); + break; + case ConnectionOneofCase.PscConnection: + PscConnection = other.PscConnection.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionDetail Clone() { + return new ConnectionDetail(this); + } + + /// Field number for the "psc_auto_connection" field. + public const int PscAutoConnectionFieldNumber = 1; + /// + /// Detailed information of a PSC connection that is created through + /// service connectivity automation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection PscAutoConnection { + get { return connectionCase_ == ConnectionOneofCase.PscAutoConnection ? (global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection) connection_ : null; } + set { + connection_ = value; + connectionCase_ = value == null ? ConnectionOneofCase.None : ConnectionOneofCase.PscAutoConnection; + } + } + + /// Field number for the "psc_connection" field. + public const int PscConnectionFieldNumber = 2; + /// + /// Detailed information of a PSC connection that is created by the user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PscConnection PscConnection { + get { return connectionCase_ == ConnectionOneofCase.PscConnection ? (global::Google.Cloud.Memorystore.V1Beta.PscConnection) connection_ : null; } + set { + connection_ = value; + connectionCase_ = value == null ? ConnectionOneofCase.None : ConnectionOneofCase.PscConnection; + } + } + + private object connection_; + /// Enum of possible cases for the "connection" oneof. + public enum ConnectionOneofCase { + None = 0, + PscAutoConnection = 1, + PscConnection = 2, + } + private ConnectionOneofCase connectionCase_ = ConnectionOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConnectionOneofCase ConnectionCase { + get { return connectionCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearConnection() { + connectionCase_ = ConnectionOneofCase.None; + connection_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConnectionDetail); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConnectionDetail other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(PscAutoConnection, other.PscAutoConnection)) return false; + if (!object.Equals(PscConnection, other.PscConnection)) return false; + if (ConnectionCase != other.ConnectionCase) 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) hash ^= PscAutoConnection.GetHashCode(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) hash ^= PscConnection.GetHashCode(); + hash ^= (int) connectionCase_; + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + output.WriteRawTag(10); + output.WriteMessage(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + output.WriteRawTag(18); + output.WriteMessage(PscConnection); + } + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + output.WriteRawTag(10); + output.WriteMessage(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + output.WriteRawTag(18); + output.WriteMessage(PscConnection); + } + 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 (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PscAutoConnection); + } + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PscConnection); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConnectionDetail other) { + if (other == null) { + return; + } + switch (other.ConnectionCase) { + case ConnectionOneofCase.PscAutoConnection: + if (PscAutoConnection == null) { + PscAutoConnection = new global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection(); + } + PscAutoConnection.MergeFrom(other.PscAutoConnection); + break; + case ConnectionOneofCase.PscConnection: + if (PscConnection == null) { + PscConnection = new global::Google.Cloud.Memorystore.V1Beta.PscConnection(); + } + PscConnection.MergeFrom(other.PscConnection); + 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.Memorystore.V1Beta.PscAutoConnection subBuilder = new global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection(); + if (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + subBuilder.MergeFrom(PscAutoConnection); + } + input.ReadMessage(subBuilder); + PscAutoConnection = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1Beta.PscConnection subBuilder = new global::Google.Cloud.Memorystore.V1Beta.PscConnection(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + subBuilder.MergeFrom(PscConnection); + } + input.ReadMessage(subBuilder); + PscConnection = 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.Memorystore.V1Beta.PscAutoConnection subBuilder = new global::Google.Cloud.Memorystore.V1Beta.PscAutoConnection(); + if (connectionCase_ == ConnectionOneofCase.PscAutoConnection) { + subBuilder.MergeFrom(PscAutoConnection); + } + input.ReadMessage(subBuilder); + PscAutoConnection = subBuilder; + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1Beta.PscConnection subBuilder = new global::Google.Cloud.Memorystore.V1Beta.PscConnection(); + if (connectionCase_ == ConnectionOneofCase.PscConnection) { + subBuilder.MergeFrom(PscConnection); + } + input.ReadMessage(subBuilder); + PscConnection = subBuilder; + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Details of consumer resources in a PSC connection. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PscAutoConnection : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PscAutoConnection()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 PscAutoConnection() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscAutoConnection(PscAutoConnection other) : this() { + pscConnectionId_ = other.pscConnectionId_; + ipAddress_ = other.ipAddress_; + forwardingRule_ = other.forwardingRule_; + projectId_ = other.projectId_; + network_ = other.network_; + serviceAttachment_ = other.serviceAttachment_; + pscConnectionStatus_ = other.pscConnectionStatus_; + connectionType_ = other.connectionType_; + switch (other.PortsCase) { + case PortsOneofCase.Port: + Port = other.Port; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscAutoConnection Clone() { + return new PscAutoConnection(this); + } + + /// Field number for the "port" field. + public const int PortFieldNumber = 9; + /// + /// Optional. Output only. port will only be set for Primary/Reader or + /// Discovery endpoint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Port { + get { return HasPort ? (int) ports_ : 0; } + set { + ports_ = value; + portsCase_ = PortsOneofCase.Port; + } + } + /// Gets whether the "port" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPort { + get { return portsCase_ == PortsOneofCase.Port; } + } + /// Clears the value of the oneof if it's currently set to "port" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPort() { + if (HasPort) { + ClearPorts(); + } + } + + /// Field number for the "psc_connection_id" field. + public const int PscConnectionIdFieldNumber = 1; + private string pscConnectionId_ = ""; + /// + /// Output only. The PSC connection id of the forwarding rule connected to the + /// service attachment. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PscConnectionId { + get { return pscConnectionId_; } + set { + pscConnectionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ip_address" field. + public const int IpAddressFieldNumber = 2; + private string ipAddress_ = ""; + /// + /// Output only. The IP allocated on the consumer network for the PSC + /// forwarding rule. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "forwarding_rule" field. + public const int ForwardingRuleFieldNumber = 3; + private string forwardingRule_ = ""; + /// + /// Output only. The URI of the consumer side forwarding rule. + /// Format: + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ForwardingRule { + get { return forwardingRule_; } + set { + forwardingRule_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "project_id" field. + public const int ProjectIdFieldNumber = 4; + private string projectId_ = ""; + /// + /// Required. The consumer project_id where PSC connections are established. + /// This should be the same project_id that the instance is being created in. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProjectId { + get { return projectId_; } + set { + projectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 5; + private string network_ = ""; + /// + /// Required. The network where the PSC endpoints are created, in the form of + /// projects/{project_id}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "service_attachment" field. + public const int ServiceAttachmentFieldNumber = 6; + private string serviceAttachment_ = ""; + /// + /// Output only. The service attachment which is the target of the PSC + /// connection, in the form of + /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ServiceAttachment { + get { return serviceAttachment_; } + set { + serviceAttachment_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "psc_connection_status" field. + public const int PscConnectionStatusFieldNumber = 7; + private global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus pscConnectionStatus_ = global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified; + /// + /// Output only. The status of the PSC connection: whether a connection exists + /// and ACTIVE or it no longer exists. Please note that this value is updated + /// periodically. Please use Private Service Connect APIs for the latest + /// status. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus PscConnectionStatus { + get { return pscConnectionStatus_; } + set { + pscConnectionStatus_ = value; + } + } + + /// Field number for the "connection_type" field. + public const int ConnectionTypeFieldNumber = 8; + private global::Google.Cloud.Memorystore.V1Beta.ConnectionType connectionType_ = global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified; + /// + /// Output only. Type of the PSC connection. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.ConnectionType ConnectionType { + get { return connectionType_; } + set { + connectionType_ = value; + } + } + + private object ports_; + /// Enum of possible cases for the "ports" oneof. + public enum PortsOneofCase { + None = 0, + Port = 9, + } + private PortsOneofCase portsCase_ = PortsOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PortsOneofCase PortsCase { + get { return portsCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPorts() { + portsCase_ = PortsOneofCase.None; + ports_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PscAutoConnection); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PscAutoConnection other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Port != other.Port) return false; + if (PscConnectionId != other.PscConnectionId) return false; + if (IpAddress != other.IpAddress) return false; + if (ForwardingRule != other.ForwardingRule) return false; + if (ProjectId != other.ProjectId) return false; + if (Network != other.Network) return false; + if (ServiceAttachment != other.ServiceAttachment) return false; + if (PscConnectionStatus != other.PscConnectionStatus) return false; + if (ConnectionType != other.ConnectionType) return false; + if (PortsCase != other.PortsCase) 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 (HasPort) hash ^= Port.GetHashCode(); + if (PscConnectionId.Length != 0) hash ^= PscConnectionId.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (ForwardingRule.Length != 0) hash ^= ForwardingRule.GetHashCode(); + if (ProjectId.Length != 0) hash ^= ProjectId.GetHashCode(); + if (Network.Length != 0) hash ^= Network.GetHashCode(); + if (ServiceAttachment.Length != 0) hash ^= ServiceAttachment.GetHashCode(); + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) hash ^= PscConnectionStatus.GetHashCode(); + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) hash ^= ConnectionType.GetHashCode(); + hash ^= (int) portsCase_; + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + if (HasPort) { + output.WriteRawTag(72); + output.WriteInt32(Port); + } + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + if (HasPort) { + output.WriteRawTag(72); + output.WriteInt32(Port); + } + 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 (HasPort) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + } + if (PscConnectionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PscConnectionId); + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (ForwardingRule.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ForwardingRule); + } + if (ProjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProjectId); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (ServiceAttachment.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ConnectionType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PscAutoConnection other) { + if (other == null) { + return; + } + if (other.PscConnectionId.Length != 0) { + PscConnectionId = other.PscConnectionId; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.ForwardingRule.Length != 0) { + ForwardingRule = other.ForwardingRule; + } + if (other.ProjectId.Length != 0) { + ProjectId = other.ProjectId; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + if (other.ServiceAttachment.Length != 0) { + ServiceAttachment = other.ServiceAttachment; + } + if (other.PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + PscConnectionStatus = other.PscConnectionStatus; + } + if (other.ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + ConnectionType = other.ConnectionType; + } + switch (other.PortsCase) { + case PortsOneofCase.Port: + Port = other.Port; + 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1Beta.ConnectionType) input.ReadEnum(); + break; + } + case 72: { + Port = 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1Beta.ConnectionType) input.ReadEnum(); + break; + } + case 72: { + Port = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// User created Psc connection configuration. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PscConnection : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PscConnection()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 PscConnection() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscConnection(PscConnection other) : this() { + pscConnectionId_ = other.pscConnectionId_; + ipAddress_ = other.ipAddress_; + forwardingRule_ = other.forwardingRule_; + projectId_ = other.projectId_; + network_ = other.network_; + serviceAttachment_ = other.serviceAttachment_; + pscConnectionStatus_ = other.pscConnectionStatus_; + connectionType_ = other.connectionType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PscConnection Clone() { + return new PscConnection(this); + } + + /// Field number for the "psc_connection_id" field. + public const int PscConnectionIdFieldNumber = 1; + private string pscConnectionId_ = ""; + /// + /// Output only. The PSC connection id of the forwarding rule connected to the + /// service attachment. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PscConnectionId { + get { return pscConnectionId_; } + set { + pscConnectionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ip_address" field. + public const int IpAddressFieldNumber = 2; + private string ipAddress_ = ""; + /// + /// Required. The IP allocated on the consumer network for the PSC forwarding + /// rule. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "forwarding_rule" field. + public const int ForwardingRuleFieldNumber = 3; + private string forwardingRule_ = ""; + /// + /// Required. The URI of the consumer side forwarding rule. + /// Format: + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ForwardingRule { + get { return forwardingRule_; } + set { + forwardingRule_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "project_id" field. + public const int ProjectIdFieldNumber = 4; + private string projectId_ = ""; + /// + /// Output only. The consumer project_id where the forwarding rule is created + /// from. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProjectId { + get { return projectId_; } + set { + projectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 5; + private string network_ = ""; + /// + /// Required. The consumer network where the IP address resides, in the form of + /// projects/{project_id}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "service_attachment" field. + public const int ServiceAttachmentFieldNumber = 6; + private string serviceAttachment_ = ""; + /// + /// Required. The service attachment which is the target of the PSC connection, + /// in the form of + /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ServiceAttachment { + get { return serviceAttachment_; } + set { + serviceAttachment_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "psc_connection_status" field. + public const int PscConnectionStatusFieldNumber = 7; + private global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus pscConnectionStatus_ = global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified; + /// + /// Output only. The status of the PSC connection: whether a connection exists + /// and ACTIVE or it no longer exists. Please note that this value is updated + /// periodically. Please use Private Service Connect APIs for the latest + /// status. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus PscConnectionStatus { + get { return pscConnectionStatus_; } + set { + pscConnectionStatus_ = value; + } + } + + /// Field number for the "connection_type" field. + public const int ConnectionTypeFieldNumber = 8; + private global::Google.Cloud.Memorystore.V1Beta.ConnectionType connectionType_ = global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified; + /// + /// Output only. Type of the PSC connection. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.ConnectionType ConnectionType { + get { return connectionType_; } + set { + connectionType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PscConnection); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PscConnection other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PscConnectionId != other.PscConnectionId) return false; + if (IpAddress != other.IpAddress) return false; + if (ForwardingRule != other.ForwardingRule) return false; + if (ProjectId != other.ProjectId) return false; + if (Network != other.Network) return false; + if (ServiceAttachment != other.ServiceAttachment) return false; + if (PscConnectionStatus != other.PscConnectionStatus) return false; + if (ConnectionType != other.ConnectionType) 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 (PscConnectionId.Length != 0) hash ^= PscConnectionId.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (ForwardingRule.Length != 0) hash ^= ForwardingRule.GetHashCode(); + if (ProjectId.Length != 0) hash ^= ProjectId.GetHashCode(); + if (Network.Length != 0) hash ^= Network.GetHashCode(); + if (ServiceAttachment.Length != 0) hash ^= ServiceAttachment.GetHashCode(); + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) hash ^= PscConnectionStatus.GetHashCode(); + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) hash ^= ConnectionType.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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + 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 (PscConnectionId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PscConnectionId); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(18); + output.WriteString(IpAddress); + } + if (ForwardingRule.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ForwardingRule); + } + if (ProjectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ProjectId); + } + if (Network.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Network); + } + if (ServiceAttachment.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + output.WriteRawTag(64); + output.WriteEnum((int) ConnectionType); + } + 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 (PscConnectionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PscConnectionId); + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (ForwardingRule.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ForwardingRule); + } + if (ProjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProjectId); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (ServiceAttachment.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceAttachment); + } + if (PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PscConnectionStatus); + } + if (ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ConnectionType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PscConnection other) { + if (other == null) { + return; + } + if (other.PscConnectionId.Length != 0) { + PscConnectionId = other.PscConnectionId; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.ForwardingRule.Length != 0) { + ForwardingRule = other.ForwardingRule; + } + if (other.ProjectId.Length != 0) { + ProjectId = other.ProjectId; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + if (other.ServiceAttachment.Length != 0) { + ServiceAttachment = other.ServiceAttachment; + } + if (other.PscConnectionStatus != global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus.Unspecified) { + PscConnectionStatus = other.PscConnectionStatus; + } + if (other.ConnectionType != global::Google.Cloud.Memorystore.V1Beta.ConnectionType.Unspecified) { + ConnectionType = other.ConnectionType; + } + _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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1Beta.ConnectionType) 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: { + PscConnectionId = input.ReadString(); + break; + } + case 18: { + IpAddress = input.ReadString(); + break; + } + case 26: { + ForwardingRule = input.ReadString(); + break; + } + case 34: { + ProjectId = input.ReadString(); + break; + } + case 42: { + Network = input.ReadString(); + break; + } + case 50: { + ServiceAttachment = input.ReadString(); + break; + } + case 56: { + PscConnectionStatus = (global::Google.Cloud.Memorystore.V1Beta.PscConnectionStatus) input.ReadEnum(); + break; + } + case 64: { + ConnectionType = (global::Google.Cloud.Memorystore.V1Beta.ConnectionType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Represents an endpoint for clients to connect to the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DiscoveryEndpoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DiscoveryEndpoint()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 DiscoveryEndpoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DiscoveryEndpoint(DiscoveryEndpoint other) : this() { + address_ = other.address_; + port_ = other.port_; + network_ = other.network_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DiscoveryEndpoint Clone() { + return new DiscoveryEndpoint(this); + } + + /// Field number for the "address" field. + public const int AddressFieldNumber = 1; + private string address_ = ""; + /// + /// Output only. IP address of the exposed endpoint clients connect to. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Address { + get { return address_; } + set { + address_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "port" field. + public const int PortFieldNumber = 2; + private int port_; + /// + /// Output only. The port number of the exposed endpoint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Port { + get { return port_; } + set { + port_ = value; + } + } + + /// Field number for the "network" field. + public const int NetworkFieldNumber = 4; + private string network_ = ""; + /// + /// Output only. The network where the IP address of the discovery endpoint + /// will be reserved, in the form of + /// projects/{network_project}/global/networks/{network_id}. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Network { + get { return network_; } + set { + network_ = 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 DiscoveryEndpoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DiscoveryEndpoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Address != other.Address) return false; + if (Port != other.Port) return false; + if (Network != other.Network) 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 (Address.Length != 0) hash ^= Address.GetHashCode(); + if (Port != 0) hash ^= Port.GetHashCode(); + if (Network.Length != 0) hash ^= Network.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 (Address.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Address); + } + if (Port != 0) { + output.WriteRawTag(16); + output.WriteInt32(Port); + } + if (Network.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Network); + } + 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 (Address.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Address); + } + if (Port != 0) { + output.WriteRawTag(16); + output.WriteInt32(Port); + } + if (Network.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Network); + } + 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 (Address.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Address); + } + if (Port != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + } + if (Network.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Network); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DiscoveryEndpoint other) { + if (other == null) { + return; + } + if (other.Address.Length != 0) { + Address = other.Address; + } + if (other.Port != 0) { + Port = other.Port; + } + if (other.Network.Length != 0) { + Network = other.Network; + } + _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: { + Address = input.ReadString(); + break; + } + case 16: { + Port = input.ReadInt32(); + break; + } + case 34: { + Network = 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: { + Address = input.ReadString(); + break; + } + case 16: { + Port = input.ReadInt32(); + break; + } + case 34: { + Network = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Represents persistence configuration for a instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PersistenceConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PersistenceConfig()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 PersistenceConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersistenceConfig(PersistenceConfig other) : this() { + mode_ = other.mode_; + rdbConfig_ = other.rdbConfig_ != null ? other.rdbConfig_.Clone() : null; + aofConfig_ = other.aofConfig_ != null ? other.aofConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersistenceConfig Clone() { + return new PersistenceConfig(this); + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode mode_ = global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified; + /// + /// Optional. Current persistence mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + /// Field number for the "rdb_config" field. + public const int RdbConfigFieldNumber = 2; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig rdbConfig_; + /// + /// Optional. RDB configuration. This field will be ignored if mode is not RDB. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig RdbConfig { + get { return rdbConfig_; } + set { + rdbConfig_ = value; + } + } + + /// Field number for the "aof_config" field. + public const int AofConfigFieldNumber = 3; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig aofConfig_; + /// + /// Optional. AOF configuration. This field will be ignored if mode is not AOF. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig AofConfig { + get { return aofConfig_; } + set { + aofConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PersistenceConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PersistenceConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Mode != other.Mode) return false; + if (!object.Equals(RdbConfig, other.RdbConfig)) return false; + if (!object.Equals(AofConfig, other.AofConfig)) 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 (Mode != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified) hash ^= Mode.GetHashCode(); + if (rdbConfig_ != null) hash ^= RdbConfig.GetHashCode(); + if (aofConfig_ != null) hash ^= AofConfig.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 (Mode != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (rdbConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbConfig); + } + if (aofConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AofConfig); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (rdbConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbConfig); + } + if (aofConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AofConfig); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (rdbConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RdbConfig); + } + if (aofConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AofConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PersistenceConfig other) { + if (other == null) { + return; + } + if (other.Mode != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode.Unspecified) { + Mode = other.Mode; + } + if (other.rdbConfig_ != null) { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig(); + } + RdbConfig.MergeFrom(other.RdbConfig); + } + if (other.aofConfig_ != null) { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig(); + } + AofConfig.MergeFrom(other.AofConfig); + } + _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: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode) input.ReadEnum(); + break; + } + case 18: { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig(); + } + input.ReadMessage(RdbConfig); + break; + } + case 26: { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig(); + } + input.ReadMessage(AofConfig); + 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: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.PersistenceMode) input.ReadEnum(); + break; + } + case 18: { + if (rdbConfig_ == null) { + RdbConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig(); + } + input.ReadMessage(RdbConfig); + break; + } + case 26: { + if (aofConfig_ == null) { + AofConfig = new global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig(); + } + input.ReadMessage(AofConfig); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the PersistenceConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible persistence modes. + /// + public enum PersistenceMode { + /// + /// Not set. + /// + [pbr::OriginalName("PERSISTENCE_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Persistence is disabled, and any snapshot data is deleted. + /// + [pbr::OriginalName("DISABLED")] Disabled = 1, + /// + /// RDB based persistence is enabled. + /// + [pbr::OriginalName("RDB")] Rdb = 2, + /// + /// AOF based persistence is enabled. + /// + [pbr::OriginalName("AOF")] Aof = 3, + } + + /// + /// Configuration for RDB based persistence. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RDBConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RDBConfig()); + 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.Memorystore.V1Beta.PersistenceConfig.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 RDBConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RDBConfig(RDBConfig other) : this() { + rdbSnapshotPeriod_ = other.rdbSnapshotPeriod_; + rdbSnapshotStartTime_ = other.rdbSnapshotStartTime_ != null ? other.rdbSnapshotStartTime_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RDBConfig Clone() { + return new RDBConfig(this); + } + + /// Field number for the "rdb_snapshot_period" field. + public const int RdbSnapshotPeriodFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod rdbSnapshotPeriod_ = global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified; + /// + /// Optional. Period between RDB snapshots. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod RdbSnapshotPeriod { + get { return rdbSnapshotPeriod_; } + set { + rdbSnapshotPeriod_ = value; + } + } + + /// Field number for the "rdb_snapshot_start_time" field. + public const int RdbSnapshotStartTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp rdbSnapshotStartTime_; + /// + /// Optional. Time that the first snapshot was/will be attempted, and to + /// which future snapshots will be aligned. If not provided, the current time + /// will be used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp RdbSnapshotStartTime { + get { return rdbSnapshotStartTime_; } + set { + rdbSnapshotStartTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RDBConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RDBConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RdbSnapshotPeriod != other.RdbSnapshotPeriod) return false; + if (!object.Equals(RdbSnapshotStartTime, other.RdbSnapshotStartTime)) 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) hash ^= RdbSnapshotPeriod.GetHashCode(); + if (rdbSnapshotStartTime_ != null) hash ^= RdbSnapshotStartTime.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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbSnapshotStartTime); + } + 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RdbSnapshotStartTime); + } + 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 (RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RdbSnapshotPeriod); + } + if (rdbSnapshotStartTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RdbSnapshotStartTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RDBConfig other) { + if (other == null) { + return; + } + if (other.RdbSnapshotPeriod != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod.Unspecified) { + RdbSnapshotPeriod = other.RdbSnapshotPeriod; + } + if (other.rdbSnapshotStartTime_ != null) { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + RdbSnapshotStartTime.MergeFrom(other.RdbSnapshotStartTime); + } + _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: { + RdbSnapshotPeriod = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) input.ReadEnum(); + break; + } + case 18: { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RdbSnapshotStartTime); + 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: { + RdbSnapshotPeriod = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.RDBConfig.Types.SnapshotPeriod) input.ReadEnum(); + break; + } + case 18: { + if (rdbSnapshotStartTime_ == null) { + RdbSnapshotStartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(RdbSnapshotStartTime); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the RDBConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible snapshot periods. + /// + public enum SnapshotPeriod { + /// + /// Not set. + /// + [pbr::OriginalName("SNAPSHOT_PERIOD_UNSPECIFIED")] Unspecified = 0, + /// + /// One hour. + /// + [pbr::OriginalName("ONE_HOUR")] OneHour = 1, + /// + /// Six hours. + /// + [pbr::OriginalName("SIX_HOURS")] SixHours = 2, + /// + /// Twelve hours. + /// + [pbr::OriginalName("TWELVE_HOURS")] TwelveHours = 3, + /// + /// Twenty four hours. + /// + [pbr::OriginalName("TWENTY_FOUR_HOURS")] TwentyFourHours = 4, + } + + } + #endregion + + } + + /// + /// Configuration for AOF based persistence. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AOFConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AOFConfig()); + 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.Memorystore.V1Beta.PersistenceConfig.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 AOFConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AOFConfig(AOFConfig other) : this() { + appendFsync_ = other.appendFsync_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AOFConfig Clone() { + return new AOFConfig(this); + } + + /// Field number for the "append_fsync" field. + public const int AppendFsyncFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync appendFsync_ = global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified; + /// + /// Optional. The fsync mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync AppendFsync { + get { return appendFsync_; } + set { + appendFsync_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AOFConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AOFConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AppendFsync != other.AppendFsync) 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 (AppendFsync != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) hash ^= AppendFsync.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 (AppendFsync != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AppendFsync); + } + 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 (AppendFsync != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AppendFsync); + } + 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 (AppendFsync != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AppendFsync); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AOFConfig other) { + if (other == null) { + return; + } + if (other.AppendFsync != global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync.Unspecified) { + AppendFsync = other.AppendFsync; + } + _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: { + AppendFsync = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) 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: { + AppendFsync = (global::Google.Cloud.Memorystore.V1Beta.PersistenceConfig.Types.AOFConfig.Types.AppendFsync) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the AOFConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible fsync modes. + /// + public enum AppendFsync { + /// + /// Not set. Default: EVERY_SEC + /// + [pbr::OriginalName("APPEND_FSYNC_UNSPECIFIED")] Unspecified = 0, + /// + /// Never fsync. Normally Linux will flush data every 30 seconds with this + /// configuration, but it's up to the kernel's exact tuning. + /// + [pbr::OriginalName("NEVER")] Never = 1, + /// + /// Fsync every second. You may lose 1 second of data if there is a + /// disaster. + /// + [pbr::OriginalName("EVERY_SEC")] EverySec = 2, + /// + /// Fsync every time new write commands are appended to the AOF. The best + /// data loss protection at the cost of performance. + /// + [pbr::OriginalName("ALWAYS")] Always = 3, + } + + } + #endregion + + } + + } + #endregion + + } + + /// + /// Represents configuration for nodes of the instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NodeConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeConfig()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 NodeConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeConfig(NodeConfig other) : this() { + sizeGb_ = other.sizeGb_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeConfig Clone() { + return new NodeConfig(this); + } + + /// Field number for the "size_gb" field. + public const int SizeGbFieldNumber = 1; + private double sizeGb_; + /// + /// Output only. Memory size in GB of the node. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double SizeGb { + get { return sizeGb_; } + set { + sizeGb_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NodeConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NodeConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SizeGb, other.SizeGb)) 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 (SizeGb != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SizeGb); + 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 (SizeGb != 0D) { + output.WriteRawTag(9); + output.WriteDouble(SizeGb); + } + 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 (SizeGb != 0D) { + output.WriteRawTag(9); + output.WriteDouble(SizeGb); + } + 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 (SizeGb != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NodeConfig other) { + if (other == null) { + return; + } + if (other.SizeGb != 0D) { + SizeGb = other.SizeGb; + } + _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 9: { + SizeGb = input.ReadDouble(); + 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 9: { + SizeGb = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + /// + /// Zone distribution configuration for allocation of instance resources. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ZoneDistributionConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ZoneDistributionConfig()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 ZoneDistributionConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ZoneDistributionConfig(ZoneDistributionConfig other) : this() { + zone_ = other.zone_; + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ZoneDistributionConfig Clone() { + return new ZoneDistributionConfig(this); + } + + /// Field number for the "zone" field. + public const int ZoneFieldNumber = 2; + private string zone_ = ""; + /// + /// Optional. Defines zone where all resources will be allocated with + /// SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Zone { + get { return zone_; } + set { + zone_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode mode_ = global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified; + /// + /// Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ZoneDistributionConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ZoneDistributionConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Zone != other.Zone) return false; + if (Mode != other.Mode) 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 (Zone.Length != 0) hash ^= Zone.GetHashCode(); + if (Mode != global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) hash ^= Mode.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 (Mode != global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (Zone.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Zone); + } + 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 (Mode != global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + if (Zone.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Zone); + } + 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 (Zone.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Zone); + } + if (Mode != global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ZoneDistributionConfig other) { + if (other == null) { + return; + } + if (other.Zone.Length != 0) { + Zone = other.Zone; + } + if (other.Mode != global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode.Unspecified) { + Mode = other.Mode; + } + _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: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode) input.ReadEnum(); + break; + } + case 18: { + Zone = 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: { + Mode = (global::Google.Cloud.Memorystore.V1Beta.ZoneDistributionConfig.Types.ZoneDistributionMode) input.ReadEnum(); + break; + } + case 18: { + Zone = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ZoneDistributionConfig message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Possible zone distribution modes. + /// + public enum ZoneDistributionMode { + /// + /// Not Set. Default: MULTI_ZONE + /// + [pbr::OriginalName("ZONE_DISTRIBUTION_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Distribute resources across 3 zones picked at random within the + /// region. + /// + [pbr::OriginalName("MULTI_ZONE")] MultiZone = 1, + /// + /// Provision resources in a single zone. Zone field must be specified. + /// + [pbr::OriginalName("SINGLE_ZONE")] SingleZone = 2, + } + + } + #endregion + + } + + /// + /// Request message for [ListInstances][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListInstancesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListInstancesRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 ListInstancesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesRequest(ListInstancesRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesRequest Clone() { + return new ListInstancesRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Requested page size. Server may return fewer items than + /// requested. If unspecified, server will pick an appropriate default. + /// + [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_ = ""; + /// + /// Optional. A token identifying a page of results the server should return. + /// + [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_ = ""; + /// + /// Optional. Expression for filtering results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Optional. Sort results by a defined order. Supported values: "name", + /// "create_time". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = 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 ListInstancesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListInstancesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) 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 (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + 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 (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + 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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + 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 (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + 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 (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + 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 (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListInstancesRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + _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: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = 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: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Response message for [ListInstances][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListInstancesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListInstancesResponse()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 ListInstancesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesResponse(ListInstancesResponse other) : this() { + instances_ = other.instances_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListInstancesResponse Clone() { + return new ListInstancesResponse(this); + } + + /// Field number for the "instances" field. + public const int InstancesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_instances_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1Beta.Instance.Parser); + private readonly pbc::RepeatedField instances_ = new pbc::RepeatedField(); + /// + /// If the {location} requested was "-" the response contains a list of + /// instances from all locations. Instances in unreachable locations will be + /// omitted. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Instances { + get { return instances_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListInstancesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListInstancesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!instances_.Equals(other.instances_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) 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 ^= instances_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.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 + instances_.WriteTo(output, _repeated_instances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_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) { + instances_.WriteTo(ref output, _repeated_instances_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_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 += instances_.CalculateSize(_repeated_instances_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListInstancesResponse other) { + if (other == null) { + return; + } + instances_.Add(other.instances_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _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: { + instances_.AddEntriesFrom(input, _repeated_instances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_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: { + instances_.AddEntriesFrom(ref input, _repeated_instances_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [GetInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetInstanceRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 GetInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetInstanceRequest(GetInstanceRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetInstanceRequest Clone() { + return new GetInstanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 GetInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetInstanceRequest 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(GetInstanceRequest 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 + + } + + /// + /// Request message for [CreateInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateInstanceRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 CreateInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateInstanceRequest(CreateInstanceRequest other) : this() { + parent_ = other.parent_; + instanceId_ = other.instanceId_; + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateInstanceRequest Clone() { + return new CreateInstanceRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "instance_id" field. + public const int InstanceIdFieldNumber = 2; + private string instanceId_ = ""; + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InstanceId { + get { return instanceId_; } + set { + instanceId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 3; + private global::Google.Cloud.Memorystore.V1Beta.Instance instance_; + /// + /// Required. The instance to create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 4; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 CreateInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (InstanceId != other.InstanceId) return false; + if (!object.Equals(Instance, other.Instance)) return false; + if (RequestId != other.RequestId) 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 (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (InstanceId.Length != 0) hash ^= InstanceId.GetHashCode(); + if (instance_ != null) hash ^= Instance.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (InstanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InstanceId); + } + if (instance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + 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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (InstanceId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InstanceId); + } + if (instance_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RequestId); + } + 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 (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (InstanceId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceId); + } + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateInstanceRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.InstanceId.Length != 0) { + InstanceId = other.InstanceId; + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + Instance.MergeFrom(other.Instance); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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: { + Parent = input.ReadString(); + break; + } + case 18: { + InstanceId = input.ReadString(); + break; + } + case 26: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 34: { + RequestId = 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: { + Parent = input.ReadString(); + break; + } + case 18: { + InstanceId = input.ReadString(); + break; + } + case 26: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 34: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [UpdateInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateInstanceRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 UpdateInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInstanceRequest(UpdateInstanceRequest other) : this() { + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + instance_ = other.instance_ != null ? other.instance_.Clone() : null; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateInstanceRequest Clone() { + return new UpdateInstanceRequest(this); + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + /// Field number for the "instance" field. + public const int InstanceFieldNumber = 2; + private global::Google.Cloud.Memorystore.V1Beta.Instance instance_; + /// + /// Required. The instance to update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.Instance Instance { + get { return instance_; } + set { + instance_ = value; + } + } + + /// Field number for the "request_id" field. + public const int RequestIdFieldNumber = 3; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 UpdateInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + if (!object.Equals(Instance, other.Instance)) return false; + if (RequestId != other.RequestId) 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 (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (instance_ != null) hash ^= Instance.GetHashCode(); + if (RequestId.Length != 0) hash ^= RequestId.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 (updateMask_ != null) { + output.WriteRawTag(10); + output.WriteMessage(UpdateMask); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + 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 (updateMask_ != null) { + output.WriteRawTag(10); + output.WriteMessage(UpdateMask); + } + if (instance_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Instance); + } + if (RequestId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RequestId); + } + 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 (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (instance_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Instance); + } + if (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateInstanceRequest other) { + if (other == null) { + return; + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + if (other.instance_ != null) { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + Instance.MergeFrom(other.Instance); + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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 (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + RequestId = 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: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + case 18: { + if (instance_ == null) { + Instance = new global::Google.Cloud.Memorystore.V1Beta.Instance(); + } + input.ReadMessage(Instance); + break; + } + case 26: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [DeleteInstance][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteInstanceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteInstanceRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 DeleteInstanceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteInstanceRequest(DeleteInstanceRequest other) : this() { + name_ = other.name_; + requestId_ = other.requestId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteInstanceRequest Clone() { + return new DeleteInstanceRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + [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 "request_id" field. + public const int RequestIdFieldNumber = 2; + private string requestId_ = ""; + /// + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. + /// + /// For example, consider a situation where you make an initial request and the + /// request times out. If you make the request again with the same request + /// ID, the server can check if original operation with the same request ID + /// was received, and if so, will ignore the second request. This prevents + /// clients from accidentally creating duplicate commitments. + /// + /// The request ID must be a valid UUID with the exception that zero UUID is + /// not supported (00000000-0000-0000-0000-000000000000). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RequestId { + get { return requestId_; } + set { + requestId_ = 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 DeleteInstanceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteInstanceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (RequestId != other.RequestId) 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 (RequestId.Length != 0) hash ^= RequestId.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 (RequestId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestId); + } + 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 (RequestId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RequestId); + } + 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 (RequestId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RequestId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteInstanceRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.RequestId.Length != 0) { + RequestId = other.RequestId; + } + _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: { + RequestId = 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; + } + case 18: { + RequestId = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for [GetCertificateAuthority][]. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetCertificateAuthorityRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetCertificateAuthorityRequest()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 GetCertificateAuthorityRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetCertificateAuthorityRequest(GetCertificateAuthorityRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetCertificateAuthorityRequest Clone() { + return new GetCertificateAuthorityRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + [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 GetCertificateAuthorityRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetCertificateAuthorityRequest 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(GetCertificateAuthorityRequest 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 + + } + + /// + /// A certificate authority for an instance. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CertificateAuthority : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CertificateAuthority()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 CertificateAuthority() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertificateAuthority(CertificateAuthority other) : this() { + name_ = other.name_; + switch (other.ServerCaCase) { + case ServerCaOneofCase.ManagedServerCa: + ManagedServerCa = other.ManagedServerCa.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertificateAuthority Clone() { + return new CertificateAuthority(this); + } + + /// Field number for the "managed_server_ca" field. + public const int ManagedServerCaFieldNumber = 2; + /// + /// A managed server certificate authority. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority ManagedServerCa { + get { return serverCaCase_ == ServerCaOneofCase.ManagedServerCa ? (global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority) serverCa_ : null; } + set { + serverCa_ = value; + serverCaCase_ = value == null ? ServerCaOneofCase.None : ServerCaOneofCase.ManagedServerCa; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Identifier. Unique name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object serverCa_; + /// Enum of possible cases for the "server_ca" oneof. + public enum ServerCaOneofCase { + None = 0, + ManagedServerCa = 2, + } + private ServerCaOneofCase serverCaCase_ = ServerCaOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServerCaOneofCase ServerCaCase { + get { return serverCaCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearServerCa() { + serverCaCase_ = ServerCaOneofCase.None; + serverCa_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CertificateAuthority); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CertificateAuthority other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ManagedServerCa, other.ManagedServerCa)) return false; + if (Name != other.Name) return false; + if (ServerCaCase != other.ServerCaCase) 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) hash ^= ManagedServerCa.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= (int) serverCaCase_; + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + output.WriteRawTag(18); + output.WriteMessage(ManagedServerCa); + } + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + output.WriteRawTag(18); + output.WriteMessage(ManagedServerCa); + } + 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 (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ManagedServerCa); + } + 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(CertificateAuthority other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + switch (other.ServerCaCase) { + case ServerCaOneofCase.ManagedServerCa: + if (ManagedServerCa == null) { + ManagedServerCa = new global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority(); + } + ManagedServerCa.MergeFrom(other.ManagedServerCa); + 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: { + Name = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority subBuilder = new global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority(); + if (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + subBuilder.MergeFrom(ManagedServerCa); + } + input.ReadMessage(subBuilder); + ManagedServerCa = 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: { + Name = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority subBuilder = new global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority(); + if (serverCaCase_ == ServerCaOneofCase.ManagedServerCa) { + subBuilder.MergeFrom(ManagedServerCa); + } + input.ReadMessage(subBuilder); + ManagedServerCa = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CertificateAuthority message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A managed certificate authority. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ManagedCertificateAuthority : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedCertificateAuthority()); + 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.Memorystore.V1Beta.CertificateAuthority.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 ManagedCertificateAuthority() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCertificateAuthority(ManagedCertificateAuthority other) : this() { + caCerts_ = other.caCerts_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCertificateAuthority Clone() { + return new ManagedCertificateAuthority(this); + } + + /// Field number for the "ca_certs" field. + public const int CaCertsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_caCerts_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority.Types.CertChain.Parser); + private readonly pbc::RepeatedField caCerts_ = new pbc::RepeatedField(); + /// + /// PEM encoded CA certificate chains for managed server authentication. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField CaCerts { + get { return caCerts_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ManagedCertificateAuthority); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ManagedCertificateAuthority other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!caCerts_.Equals(other.caCerts_)) 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 ^= caCerts_.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 + caCerts_.WriteTo(output, _repeated_caCerts_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) { + caCerts_.WriteTo(ref output, _repeated_caCerts_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 += caCerts_.CalculateSize(_repeated_caCerts_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ManagedCertificateAuthority other) { + if (other == null) { + return; + } + caCerts_.Add(other.caCerts_); + _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: { + caCerts_.AddEntriesFrom(input, _repeated_caCerts_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: { + caCerts_.AddEntriesFrom(ref input, _repeated_caCerts_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ManagedCertificateAuthority message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A certificate chain. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CertChain : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CertChain()); + 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.Memorystore.V1Beta.CertificateAuthority.Types.ManagedCertificateAuthority.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 CertChain() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertChain(CertChain other) : this() { + certificates_ = other.certificates_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CertChain Clone() { + return new CertChain(this); + } + + /// Field number for the "certificates" field. + public const int CertificatesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_certificates_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField certificates_ = new pbc::RepeatedField(); + /// + /// The certificates that form the CA chain in order of leaf to root. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Certificates { + get { return certificates_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CertChain); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CertChain other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!certificates_.Equals(other.certificates_)) 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 ^= certificates_.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 + certificates_.WriteTo(output, _repeated_certificates_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) { + certificates_.WriteTo(ref output, _repeated_certificates_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 += certificates_.CalculateSize(_repeated_certificates_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CertChain other) { + if (other == null) { + return; + } + certificates_.Add(other.certificates_); + _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: { + certificates_.AddEntriesFrom(input, _repeated_certificates_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: { + certificates_.AddEntriesFrom(ref input, _repeated_certificates_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + } + #endregion + + } + + /// + /// Represents the metadata of a long-running operation. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OperationMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OperationMetadata()); + 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.Memorystore.V1Beta.MemorystoreReflection.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 OperationMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata(OperationMetadata other) : this() { + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + endTime_ = other.endTime_ != null ? other.endTime_.Clone() : null; + target_ = other.target_; + verb_ = other.verb_; + statusMessage_ = other.statusMessage_; + requestedCancellation_ = other.requestedCancellation_; + apiVersion_ = other.apiVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperationMetadata Clone() { + return new OperationMetadata(this); + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. The time the operation was 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 "end_time" field. + public const int EndTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp endTime_; + /// + /// Output only. The time the operation finished running. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp EndTime { + get { return endTime_; } + set { + endTime_ = value; + } + } + + /// Field number for the "target" field. + public const int TargetFieldNumber = 3; + private string target_ = ""; + /// + /// Output only. Server-defined resource path for the target of the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Target { + get { return target_; } + set { + target_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verb" field. + public const int VerbFieldNumber = 4; + private string verb_ = ""; + /// + /// Output only. Name of the verb executed by the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Verb { + get { return verb_; } + set { + verb_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status_message" field. + public const int StatusMessageFieldNumber = 5; + private string statusMessage_ = ""; + /// + /// Output only. Human-readable status of the operation, if any. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StatusMessage { + get { return statusMessage_; } + set { + statusMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "requested_cancellation" field. + public const int RequestedCancellationFieldNumber = 6; + private bool requestedCancellation_; + /// + /// Output only. Identifies whether the user has requested cancellation + /// of the operation. Operations that have been cancelled successfully + /// have [Operation.error][] value with a + /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + /// `Code.CANCELLED`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RequestedCancellation { + get { return requestedCancellation_; } + set { + requestedCancellation_ = value; + } + } + + /// Field number for the "api_version" field. + public const int ApiVersionFieldNumber = 7; + private string apiVersion_ = ""; + /// + /// Output only. API version used to start the operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ApiVersion { + get { return apiVersion_; } + set { + apiVersion_ = 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 OperationMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OperationMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(EndTime, other.EndTime)) return false; + if (Target != other.Target) return false; + if (Verb != other.Verb) return false; + if (StatusMessage != other.StatusMessage) return false; + if (RequestedCancellation != other.RequestedCancellation) return false; + if (ApiVersion != other.ApiVersion) 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 (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (endTime_ != null) hash ^= EndTime.GetHashCode(); + if (Target.Length != 0) hash ^= Target.GetHashCode(); + if (Verb.Length != 0) hash ^= Verb.GetHashCode(); + if (StatusMessage.Length != 0) hash ^= StatusMessage.GetHashCode(); + if (RequestedCancellation != false) hash ^= RequestedCancellation.GetHashCode(); + if (ApiVersion.Length != 0) hash ^= ApiVersion.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 (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + 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 (createTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(CreateTime); + } + if (endTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(EndTime); + } + if (Target.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Target); + } + if (Verb.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Verb); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + if (RequestedCancellation != false) { + output.WriteRawTag(48); + output.WriteBool(RequestedCancellation); + } + if (ApiVersion.Length != 0) { + output.WriteRawTag(58); + output.WriteString(ApiVersion); + } + 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 (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (endTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EndTime); + } + if (Target.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Target); + } + if (Verb.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Verb); + } + if (StatusMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StatusMessage); + } + if (RequestedCancellation != false) { + size += 1 + 1; + } + if (ApiVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ApiVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OperationMetadata other) { + if (other == null) { + return; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.endTime_ != null) { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + EndTime.MergeFrom(other.EndTime); + } + if (other.Target.Length != 0) { + Target = other.Target; + } + if (other.Verb.Length != 0) { + Verb = other.Verb; + } + if (other.StatusMessage.Length != 0) { + StatusMessage = other.StatusMessage; + } + if (other.RequestedCancellation != false) { + RequestedCancellation = other.RequestedCancellation; + } + if (other.ApiVersion.Length != 0) { + ApiVersion = other.ApiVersion; + } + _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 (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = 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: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 18: { + if (endTime_ == null) { + EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(EndTime); + break; + } + case 26: { + Target = input.ReadString(); + break; + } + case 34: { + Verb = input.ReadString(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 48: { + RequestedCancellation = input.ReadBool(); + break; + } + case 58: { + ApiVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreClient.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreClient.g.cs new file mode 100644 index 000000000000..b63fbaac53ee --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreClient.g.cs @@ -0,0 +1,1507 @@ +// Copyright 2025 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 gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using lro = Google.LongRunning; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; +using wkt = Google.Protobuf.WellKnownTypes; + +namespace Google.Cloud.Memorystore.V1Beta +{ + /// Settings for instances. + public sealed partial class MemorystoreSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static MemorystoreSettings GetDefault() => new MemorystoreSettings(); + + /// Constructs a new object with default settings. + public MemorystoreSettings() + { + } + + private MemorystoreSettings(MemorystoreSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + ListInstancesSettings = existing.ListInstancesSettings; + GetInstanceSettings = existing.GetInstanceSettings; + CreateInstanceSettings = existing.CreateInstanceSettings; + CreateInstanceOperationsSettings = existing.CreateInstanceOperationsSettings.Clone(); + UpdateInstanceSettings = existing.UpdateInstanceSettings; + UpdateInstanceOperationsSettings = existing.UpdateInstanceOperationsSettings.Clone(); + DeleteInstanceSettings = existing.DeleteInstanceSettings; + DeleteInstanceOperationsSettings = existing.DeleteInstanceOperationsSettings.Clone(); + GetCertificateAuthoritySettings = existing.GetCertificateAuthoritySettings; + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(MemorystoreSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.ListInstances and MemorystoreClient.ListInstancesAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListInstancesSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.GetInstance and MemorystoreClient.GetInstanceAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetInstanceSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.CreateInstance and MemorystoreClient.CreateInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings CreateInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.CreateInstance and + /// MemorystoreClient.CreateInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings CreateInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.UpdateInstance and MemorystoreClient.UpdateInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings UpdateInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.UpdateInstance and + /// MemorystoreClient.UpdateInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings UpdateInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.DeleteInstance and MemorystoreClient.DeleteInstanceAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 600 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteInstanceSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(600000))); + + /// + /// Long Running Operation settings for calls to MemorystoreClient.DeleteInstance and + /// MemorystoreClient.DeleteInstanceAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings DeleteInstanceOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to + /// MemorystoreClient.GetCertificateAuthority and MemorystoreClient.GetCertificateAuthorityAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetCertificateAuthoritySettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// The settings to use for the associated with the client. + /// + public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault(); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public MemorystoreSettings Clone() => new MemorystoreSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class MemorystoreClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public MemorystoreSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public MemorystoreClientBuilder() : base(MemorystoreClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref MemorystoreClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override MemorystoreClient Build() + { + MemorystoreClient 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 MemorystoreClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return MemorystoreClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return MemorystoreClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => MemorystoreClient.ChannelPool; + } + + /// Memorystore client wrapper, for convenient use. + /// + /// Service describing handlers for resources + /// + public abstract partial class MemorystoreClient + { + /// + /// The default endpoint for the Memorystore service, which is a host of "memorystore.googleapis.com" and a port + /// of 443. + /// + public static string DefaultEndpoint { get; } = "memorystore.googleapis.com:443"; + + /// The default Memorystore scopes. + /// + /// The default Memorystore scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(Memorystore.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Rest, 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 MemorystoreClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static MemorystoreClient Create() => new MemorystoreClientBuilder().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 MemorystoreClient Create(grpccore::CallInvoker callInvoker, MemorystoreSettings 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); + } + Memorystore.MemorystoreClient grpcClient = new Memorystore.MemorystoreClient(callInvoker); + return new MemorystoreClientImpl(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 Memorystore client + public virtual Memorystore.MemorystoreClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstances(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstances(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstancesAsync(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstances(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstances(request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// + /// Required. The parent to list instances from. + /// Format: projects/{project}/locations/{location} + /// + /// + /// 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 ListInstancesAsync(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListInstancesRequest request = new ListInstancesRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListInstancesAsync(request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 Instance GetInstance(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, st::CancellationToken cancellationToken) => + GetInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Instance GetInstance(string name, gaxgrpc::CallSettings callSettings = null) => + GetInstance(new GetInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetInstanceAsync(new GetInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(string name, st::CancellationToken cancellationToken) => + GetInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Instance GetInstance(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetInstance(new GetInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetInstanceAsync(new GetInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details of a single Instance. + /// + /// + /// Required. The name of the instance to retrieve. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetInstanceAsync(InstanceName name, st::CancellationToken cancellationToken) => + GetInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 lro::Operation CreateInstance(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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> CreateInstanceAsync(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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> CreateInstanceAsync(CreateInstanceRequest request, st::CancellationToken cancellationToken) => + CreateInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for CreateInstance. + public virtual lro::OperationsClient CreateInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of CreateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceCreateInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// CreateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceCreateInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateInstanceOperationsClient, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateInstance(string parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstance(new CreateInstanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(string parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstanceAsync(new CreateInstanceRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(string parent, Instance instance, string instanceId, st::CancellationToken cancellationToken) => + CreateInstanceAsync(parent, instance, instanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateInstance(gagr::LocationName parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstance(new CreateInstanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(gagr::LocationName parent, Instance instance, string instanceId, gaxgrpc::CallSettings callSettings = null) => + CreateInstanceAsync(new CreateInstanceRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + InstanceId = gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId)), + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Creates a new Instance in a given project and location. + /// + /// + /// Required. The parent resource where this instance will be created. + /// Format: projects/{project}/locations/{location} + /// + /// + /// Required. The instance to create. + /// + /// + /// Required. The ID to use for the instance, which will become the final + /// component of the instance's resource name. + /// + /// This value is subject to the following restrictions: + /// + /// * Must be 4-63 characters in length + /// * Must begin with a letter or digit + /// * Must contain only lowercase letters, digits, and hyphens + /// * Must not end with a hyphen + /// * Must be unique within a location + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateInstanceAsync(gagr::LocationName parent, Instance instance, string instanceId, st::CancellationToken cancellationToken) => + CreateInstanceAsync(parent, instance, instanceId, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 lro::Operation UpdateInstance(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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> UpdateInstanceAsync(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Updates the parameters of a single Instance. + /// + /// 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> UpdateInstanceAsync(UpdateInstanceRequest request, st::CancellationToken cancellationToken) => + UpdateInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for UpdateInstance. + public virtual lro::OperationsClient UpdateInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of UpdateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceUpdateInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), UpdateInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// UpdateInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceUpdateInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), UpdateInstanceOperationsClient, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation UpdateInstance(Instance instance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateInstance(new UpdateInstanceRequest + { + UpdateMask = updateMask, + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> UpdateInstanceAsync(Instance instance, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateInstanceAsync(new UpdateInstanceRequest + { + UpdateMask = updateMask, + Instance = gax::GaxPreconditions.CheckNotNull(instance, nameof(instance)), + }, callSettings); + + /// + /// Updates the parameters of a single Instance. + /// + /// + /// Required. The instance to update. + /// + /// + /// Optional. The list of fields to be updated on the instance. At least one + /// field must be specified. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> UpdateInstanceAsync(Instance instance, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateInstanceAsync(instance, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes a single Instance. + /// + /// 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 lro::Operation DeleteInstance(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes a single Instance. + /// + /// 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> DeleteInstanceAsync(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes a single Instance. + /// + /// 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> DeleteInstanceAsync(DeleteInstanceRequest request, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for DeleteInstance. + public virtual lro::OperationsClient DeleteInstanceOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of DeleteInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceDeleteInstance(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteInstanceOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// DeleteInstance. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceDeleteInstanceAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), DeleteInstanceOperationsClient, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteInstance(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstance(new DeleteInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstanceAsync(new DeleteInstanceRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(string name, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation DeleteInstance(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstance(new DeleteInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + DeleteInstanceAsync(new DeleteInstanceRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes a single Instance. + /// + /// + /// Required. The name of the instance to delete. + /// Format: projects/{project}/locations/{location}/instances/{instance} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> DeleteInstanceAsync(InstanceName name, st::CancellationToken cancellationToken) => + DeleteInstanceAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 CertificateAuthority GetCertificateAuthority(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CertificateAuthority GetCertificateAuthority(string name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthority(new GetCertificateAuthorityRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthorityAsync(new GetCertificateAuthorityRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(string name, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual CertificateAuthority GetCertificateAuthority(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthority(new GetCertificateAuthorityRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(InstanceName name, gaxgrpc::CallSettings callSettings = null) => + GetCertificateAuthorityAsync(new GetCertificateAuthorityRequest + { + InstanceName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// + /// Required. The name of the certificate authority. + /// Format: + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetCertificateAuthorityAsync(InstanceName name, st::CancellationToken cancellationToken) => + GetCertificateAuthorityAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + } + + /// Memorystore client wrapper implementation, for convenient use. + /// + /// Service describing handlers for resources + /// + public sealed partial class MemorystoreClientImpl : MemorystoreClient + { + private readonly gaxgrpc::ApiCall _callListInstances; + + private readonly gaxgrpc::ApiCall _callGetInstance; + + private readonly gaxgrpc::ApiCall _callCreateInstance; + + private readonly gaxgrpc::ApiCall _callUpdateInstance; + + private readonly gaxgrpc::ApiCall _callDeleteInstance; + + private readonly gaxgrpc::ApiCall _callGetCertificateAuthority; + + /// + /// Constructs a client wrapper for the Memorystore 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 MemorystoreClientImpl(Memorystore.MemorystoreClient grpcClient, MemorystoreSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + MemorystoreSettings effectiveSettings = settings ?? MemorystoreSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + CreateInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateInstanceOperationsSettings, logger); + UpdateInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateInstanceOperationsSettings, logger); + DeleteInstanceOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.DeleteInstanceOperationsSettings, logger); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callListInstances = clientHelper.BuildApiCall("ListInstances", grpcClient.ListInstancesAsync, grpcClient.ListInstances, effectiveSettings.ListInstancesSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListInstances); + Modify_ListInstancesApiCall(ref _callListInstances); + _callGetInstance = clientHelper.BuildApiCall("GetInstance", grpcClient.GetInstanceAsync, grpcClient.GetInstance, effectiveSettings.GetInstanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetInstance); + Modify_GetInstanceApiCall(ref _callGetInstance); + _callCreateInstance = clientHelper.BuildApiCall("CreateInstance", grpcClient.CreateInstanceAsync, grpcClient.CreateInstance, effectiveSettings.CreateInstanceSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callCreateInstance); + Modify_CreateInstanceApiCall(ref _callCreateInstance); + _callUpdateInstance = clientHelper.BuildApiCall("UpdateInstance", grpcClient.UpdateInstanceAsync, grpcClient.UpdateInstance, effectiveSettings.UpdateInstanceSettings).WithGoogleRequestParam("instance.name", request => request.Instance?.Name); + Modify_ApiCall(ref _callUpdateInstance); + Modify_UpdateInstanceApiCall(ref _callUpdateInstance); + _callDeleteInstance = clientHelper.BuildApiCall("DeleteInstance", grpcClient.DeleteInstanceAsync, grpcClient.DeleteInstance, effectiveSettings.DeleteInstanceSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteInstance); + Modify_DeleteInstanceApiCall(ref _callDeleteInstance); + _callGetCertificateAuthority = clientHelper.BuildApiCall("GetCertificateAuthority", grpcClient.GetCertificateAuthorityAsync, grpcClient.GetCertificateAuthority, effectiveSettings.GetCertificateAuthoritySettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetCertificateAuthority); + Modify_GetCertificateAuthorityApiCall(ref _callGetCertificateAuthority); + 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_ListInstancesApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_CreateInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteInstanceApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetCertificateAuthorityApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(Memorystore.MemorystoreClient grpcClient, MemorystoreSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC Memorystore client + public override Memorystore.MemorystoreClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_ListInstancesRequest(ref ListInstancesRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetInstanceRequest(ref GetInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_CreateInstanceRequest(ref CreateInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateInstanceRequest(ref UpdateInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteInstanceRequest(ref DeleteInstanceRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetCertificateAuthorityRequest(ref GetCertificateAuthorityRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListInstancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListInstances, request, callSettings); + } + + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(ListInstancesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListInstancesRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListInstances, request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 Instance GetInstance(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetInstanceRequest(ref request, ref callSettings); + return _callGetInstance.Sync(request, callSettings); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(GetInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetInstanceRequest(ref request, ref callSettings); + return _callGetInstance.Async(request, callSettings); + } + + /// The long-running operations client for CreateInstance. + public override lro::OperationsClient CreateInstanceOperationsClient { get; } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 lro::Operation CreateInstance(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callCreateInstance.Sync(request, callSettings), CreateInstanceOperationsClient); + } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 async stt::Task> CreateInstanceAsync(CreateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callCreateInstance.Async(request, callSettings).ConfigureAwait(false), CreateInstanceOperationsClient); + } + + /// The long-running operations client for UpdateInstance. + public override lro::OperationsClient UpdateInstanceOperationsClient { get; } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 lro::Operation UpdateInstance(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callUpdateInstance.Sync(request, callSettings), UpdateInstanceOperationsClient); + } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 async stt::Task> UpdateInstanceAsync(UpdateInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callUpdateInstance.Async(request, callSettings).ConfigureAwait(false), UpdateInstanceOperationsClient); + } + + /// The long-running operations client for DeleteInstance. + public override lro::OperationsClient DeleteInstanceOperationsClient { get; } + + /// + /// Deletes a single Instance. + /// + /// 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 lro::Operation DeleteInstance(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteInstanceRequest(ref request, ref callSettings); + return new lro::Operation(_callDeleteInstance.Sync(request, callSettings), DeleteInstanceOperationsClient); + } + + /// + /// Deletes a single Instance. + /// + /// 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 async stt::Task> DeleteInstanceAsync(DeleteInstanceRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteInstanceRequest(ref request, ref callSettings); + return new lro::Operation(await _callDeleteInstance.Async(request, callSettings).ConfigureAwait(false), DeleteInstanceOperationsClient); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 CertificateAuthority GetCertificateAuthority(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetCertificateAuthorityRequest(ref request, ref callSettings); + return _callGetCertificateAuthority.Sync(request, callSettings); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(GetCertificateAuthorityRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetCertificateAuthorityRequest(ref request, ref callSettings); + return _callGetCertificateAuthority.Async(request, callSettings); + } + } + + public partial class ListInstancesRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListInstancesResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Instances.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public static partial class Memorystore + { + public partial class MemorystoreClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// A new Operations client for the same target as this client. + public virtual lro::Operations.OperationsClient CreateOperationsClient() => + new lro::Operations.OperationsClient(CallInvoker); + } + } + + public static partial class Memorystore + { + public partial class MemorystoreClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// + /// A new for the same target as this client. + /// + public virtual gcl::Locations.LocationsClient CreateLocationsClient() => + new gcl::Locations.LocationsClient(CallInvoker); + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreGrpc.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreGrpc.g.cs new file mode 100644 index 000000000000..acd83de42ea4 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreGrpc.g.cs @@ -0,0 +1,573 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/memorystore/v1beta/memorystore.proto +// +// Original file comments: +// 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 +// +// 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.Memorystore.V1Beta { + /// + /// Service describing handlers for resources + /// + public static partial class Memorystore + { + static readonly string __ServiceName = "google.cloud.memorystore.v1beta.Memorystore"; + + [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_cloud_memorystore_v1beta_ListInstancesRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_ListInstancesResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.ListInstancesResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_GetInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_Instance = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.Instance.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_CreateInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_UpdateInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_DeleteInstanceRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_GetCertificateAuthorityRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_memorystore_v1beta_CertificateAuthority = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Memorystore.V1Beta.CertificateAuthority.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListInstances = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListInstances", + __Marshaller_google_cloud_memorystore_v1beta_ListInstancesRequest, + __Marshaller_google_cloud_memorystore_v1beta_ListInstancesResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetInstance", + __Marshaller_google_cloud_memorystore_v1beta_GetInstanceRequest, + __Marshaller_google_cloud_memorystore_v1beta_Instance); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateInstance", + __Marshaller_google_cloud_memorystore_v1beta_CreateInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateInstance", + __Marshaller_google_cloud_memorystore_v1beta_UpdateInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteInstance = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteInstance", + __Marshaller_google_cloud_memorystore_v1beta_DeleteInstanceRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetCertificateAuthority = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetCertificateAuthority", + __Marshaller_google_cloud_memorystore_v1beta_GetCertificateAuthorityRequest, + __Marshaller_google_cloud_memorystore_v1beta_CertificateAuthority); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Memorystore.V1Beta.MemorystoreReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of Memorystore + [grpc::BindServiceMethod(typeof(Memorystore), "BindService")] + public abstract partial class MemorystoreBase + { + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstances(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstance(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstance(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstance(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstance(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthority(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for Memorystore + public partial class MemorystoreClient : grpc::ClientBase + { + /// Creates a new client for Memorystore + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public MemorystoreClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for Memorystore that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public MemorystoreClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected MemorystoreClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected MemorystoreClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Lists Instances in a given project and location. + /// + /// 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.Memorystore.V1Beta.ListInstancesResponse ListInstances(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListInstances(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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.Memorystore.V1Beta.ListInstancesResponse ListInstances(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListInstances, null, options, request); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListInstancesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists Instances in a given project and location. + /// + /// 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 ListInstancesAsync(global::Google.Cloud.Memorystore.V1Beta.ListInstancesRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListInstances, null, options, request); + } + /// + /// Gets details of a single Instance. + /// + /// 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.Memorystore.V1Beta.Instance GetInstance(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details of a single Instance. + /// + /// 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.Memorystore.V1Beta.Instance GetInstance(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetInstance, null, options, request); + } + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details of a single Instance. + /// + /// 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 GetInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.GetInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetInstance, null, options, request); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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.LongRunning.Operation CreateInstance(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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.LongRunning.Operation CreateInstance(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateInstance, null, options, request); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new Instance in a given project and location. + /// + /// 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 CreateInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.CreateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateInstance, null, options, request); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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.LongRunning.Operation UpdateInstance(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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.LongRunning.Operation UpdateInstance(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateInstance, null, options, request); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Updates the parameters of a single Instance. + /// + /// 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 UpdateInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.UpdateInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateInstance, null, options, request); + } + /// + /// Deletes a single Instance. + /// + /// 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.LongRunning.Operation DeleteInstance(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteInstance(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes a single Instance. + /// + /// 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.LongRunning.Operation DeleteInstance(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteInstance, null, options, request); + } + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteInstanceAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes a single Instance. + /// + /// 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 DeleteInstanceAsync(global::Google.Cloud.Memorystore.V1Beta.DeleteInstanceRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteInstance, null, options, request); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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.Memorystore.V1Beta.CertificateAuthority GetCertificateAuthority(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetCertificateAuthority(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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.Memorystore.V1Beta.CertificateAuthority GetCertificateAuthority(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetCertificateAuthority, null, options, request); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetCertificateAuthorityAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets details about the certificate authority for an Instance. + /// + /// 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 GetCertificateAuthorityAsync(global::Google.Cloud.Memorystore.V1Beta.GetCertificateAuthorityRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetCertificateAuthority, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override MemorystoreClient NewInstance(ClientBaseConfiguration configuration) + { + return new MemorystoreClient(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(MemorystoreBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_ListInstances, serviceImpl.ListInstances) + .AddMethod(__Method_GetInstance, serviceImpl.GetInstance) + .AddMethod(__Method_CreateInstance, serviceImpl.CreateInstance) + .AddMethod(__Method_UpdateInstance, serviceImpl.UpdateInstance) + .AddMethod(__Method_DeleteInstance, serviceImpl.DeleteInstance) + .AddMethod(__Method_GetCertificateAuthority, serviceImpl.GetCertificateAuthority).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, MemorystoreBase serviceImpl) + { + serviceBinder.AddMethod(__Method_ListInstances, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListInstances)); + serviceBinder.AddMethod(__Method_GetInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetInstance)); + serviceBinder.AddMethod(__Method_CreateInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateInstance)); + serviceBinder.AddMethod(__Method_UpdateInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateInstance)); + serviceBinder.AddMethod(__Method_DeleteInstance, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteInstance)); + serviceBinder.AddMethod(__Method_GetCertificateAuthority, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetCertificateAuthority)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreResourceNames.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreResourceNames.g.cs new file mode 100644 index 000000000000..81fe848fefbc --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/MemorystoreResourceNames.g.cs @@ -0,0 +1,1436 @@ +// Copyright 2025 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 gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gcmv = Google.Cloud.Memorystore.V1Beta; +using sys = System; + +namespace Google.Cloud.Memorystore.V1Beta +{ + /// Resource name for the Instance resource. + public sealed partial class InstanceName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/instances/{instance}. + /// + ProjectLocationInstance = 1, + } + + private static gax::PathTemplate s_projectLocationInstance = new gax::PathTemplate("projects/{project}/locations/{location}/instances/{instance}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static InstanceName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new InstanceName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static InstanceName FromProjectLocationInstance(string projectId, string locationId, string instanceId) => + new InstanceName(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + public static string Format(string projectId, string locationId, string instanceId) => + FormatProjectLocationInstance(projectId, locationId, instanceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}. + /// + public static string FormatProjectLocationInstance(string projectId, string locationId, string instanceId) => + s_projectLocationInstance.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// 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}/locations/{location}/instances/{instance} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static InstanceName Parse(string instanceName) => Parse(instanceName, 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}/locations/{location}/instances/{instance} + /// + /// 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 InstanceName Parse(string instanceName, bool allowUnparsed) => + TryParse(instanceName, allowUnparsed, out InstanceName 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}/locations/{location}/instances/{instance} + /// + /// + /// 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 instanceName, out InstanceName result) => TryParse(instanceName, 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}/locations/{location}/instances/{instance} + /// + /// 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 instanceName, bool allowUnparsed, out InstanceName result) + { + gax::GaxPreconditions.CheckNotNull(instanceName, nameof(instanceName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationInstance.TryParseName(instanceName, out resourceName)) + { + result = FromProjectLocationInstance(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(instanceName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private InstanceName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string instanceId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + InstanceId = instanceId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/instances/{instance} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + public InstanceName(string projectId, string locationId, string instanceId) : this(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))) + { + } + + /// 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 Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { 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.ProjectLocationInstance: return s_projectLocationInstance.Expand(ProjectId, LocationId, InstanceId); + 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 InstanceName); + + /// + public bool Equals(InstanceName 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 ==(InstanceName a, InstanceName 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 !=(InstanceName a, InstanceName b) => !(a == b); + } + + /// Resource name for the CertificateAuthority resource. + public sealed partial class CertificateAuthorityName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + ProjectLocationInstance = 1, + } + + private static gax::PathTemplate s_projectLocationInstance = new gax::PathTemplate("projects/{project}/locations/{location}/instances/{instance}/certificateAuthority"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static CertificateAuthorityName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new CertificateAuthorityName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// A new instance of constructed from the provided ids. + /// + public static CertificateAuthorityName FromProjectLocationInstance(string projectId, string locationId, string instanceId) => + new CertificateAuthorityName(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + public static string Format(string projectId, string locationId, string instanceId) => + FormatProjectLocationInstance(projectId, locationId, instanceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority. + /// + public static string FormatProjectLocationInstance(string projectId, string locationId, string instanceId) => + s_projectLocationInstance.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))); + + /// + /// 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static CertificateAuthorityName Parse(string certificateAuthorityName) => + Parse(certificateAuthorityName, 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// 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 CertificateAuthorityName Parse(string certificateAuthorityName, bool allowUnparsed) => + TryParse(certificateAuthorityName, allowUnparsed, out CertificateAuthorityName 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// + /// 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 certificateAuthorityName, out CertificateAuthorityName result) => + TryParse(certificateAuthorityName, 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}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// + /// + /// 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 certificateAuthorityName, bool allowUnparsed, out CertificateAuthorityName result) + { + gax::GaxPreconditions.CheckNotNull(certificateAuthorityName, nameof(certificateAuthorityName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationInstance.TryParseName(certificateAuthorityName, out resourceName)) + { + result = FromProjectLocationInstance(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(certificateAuthorityName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private CertificateAuthorityName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string instanceId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + InstanceId = instanceId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of + /// pattern projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Instance ID. Must not be null or empty. + public CertificateAuthorityName(string projectId, string locationId, string instanceId) : this(ResourceNameType.ProjectLocationInstance, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), instanceId: gax::GaxPreconditions.CheckNotNullOrEmpty(instanceId, nameof(instanceId))) + { + } + + /// 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 Instance ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string InstanceId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { 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.ProjectLocationInstance: return s_projectLocationInstance.Expand(ProjectId, LocationId, InstanceId); + 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 CertificateAuthorityName); + + /// + public bool Equals(CertificateAuthorityName 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 ==(CertificateAuthorityName a, CertificateAuthorityName 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 !=(CertificateAuthorityName a, CertificateAuthorityName b) => !(a == b); + } + + /// Resource name for the ForwardingRule resource. + public sealed partial class ForwardingRuleName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// . + /// + ProjectRegionForwardingRule = 1, + } + + private static gax::PathTemplate s_projectRegionForwardingRule = new gax::PathTemplate("projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ForwardingRuleName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ForwardingRuleName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ForwardingRuleName FromProjectRegionForwardingRule(string projectId, string regionId, string forwardingRuleId) => + new ForwardingRuleName(ResourceNameType.ProjectRegionForwardingRule, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), forwardingRuleId: gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + public static string Format(string projectId, string regionId, string forwardingRuleId) => + FormatProjectRegionForwardingRule(projectId, regionId, forwardingRuleId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}. + /// + public static string FormatProjectRegionForwardingRule(string projectId, string regionId, string forwardingRuleId) => + s_projectRegionForwardingRule.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))); + + /// + /// 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ForwardingRuleName Parse(string forwardingRuleName) => Parse(forwardingRuleName, 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// 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 ForwardingRuleName Parse(string forwardingRuleName, bool allowUnparsed) => + TryParse(forwardingRuleName, allowUnparsed, out ForwardingRuleName 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// + /// 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 forwardingRuleName, out ForwardingRuleName result) => + TryParse(forwardingRuleName, 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}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// + /// 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 forwardingRuleName, bool allowUnparsed, out ForwardingRuleName result) + { + gax::GaxPreconditions.CheckNotNull(forwardingRuleName, nameof(forwardingRuleName)); + gax::TemplatedResourceName resourceName; + if (s_projectRegionForwardingRule.TryParseName(forwardingRuleName, out resourceName)) + { + result = FromProjectRegionForwardingRule(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(forwardingRuleName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ForwardingRuleName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string forwardingRuleId = null, string projectId = null, string regionId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ForwardingRuleId = forwardingRuleId; + ProjectId = projectId; + RegionId = regionId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ForwardingRule ID. Must not be null or empty. + public ForwardingRuleName(string projectId, string regionId, string forwardingRuleId) : this(ResourceNameType.ProjectRegionForwardingRule, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), forwardingRuleId: gax::GaxPreconditions.CheckNotNullOrEmpty(forwardingRuleId, nameof(forwardingRuleId))) + { + } + + /// 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 ForwardingRule ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ForwardingRuleId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The Region ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string RegionId { 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.ProjectRegionForwardingRule: return s_projectRegionForwardingRule.Expand(ProjectId, RegionId, ForwardingRuleId); + 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 ForwardingRuleName); + + /// + public bool Equals(ForwardingRuleName 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 ==(ForwardingRuleName a, ForwardingRuleName 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 !=(ForwardingRuleName a, ForwardingRuleName b) => !(a == b); + } + + /// Resource name for the Network resource. + public sealed partial class NetworkName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// A resource name with pattern projects/{project}/global/networks/{network}. + ProjectNetwork = 1, + } + + private static gax::PathTemplate s_projectNetwork = new gax::PathTemplate("projects/{project}/global/networks/{network}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static NetworkName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new NetworkName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static NetworkName FromProjectNetwork(string projectId, string networkId) => + new NetworkName(ResourceNameType.ProjectNetwork, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), networkId: gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + public static string Format(string projectId, string networkId) => FormatProjectNetwork(projectId, networkId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/global/networks/{network}. + /// + public static string FormatProjectNetwork(string projectId, string networkId) => + s_projectNetwork.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))); + + /// 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}/global/networks/{network} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static NetworkName Parse(string networkName) => Parse(networkName, 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}/global/networks/{network} + /// + /// 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 NetworkName Parse(string networkName, bool allowUnparsed) => + TryParse(networkName, allowUnparsed, out NetworkName 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}/global/networks/{network} + /// + /// + /// 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 networkName, out NetworkName result) => TryParse(networkName, 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}/global/networks/{network} + /// + /// 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 networkName, bool allowUnparsed, out NetworkName result) + { + gax::GaxPreconditions.CheckNotNull(networkName, nameof(networkName)); + gax::TemplatedResourceName resourceName; + if (s_projectNetwork.TryParseName(networkName, out resourceName)) + { + result = FromProjectNetwork(resourceName[0], resourceName[1]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(networkName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private NetworkName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string networkId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + NetworkId = networkId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/global/networks/{network} + /// + /// The Project ID. Must not be null or empty. + /// The Network ID. Must not be null or empty. + public NetworkName(string projectId, string networkId) : this(ResourceNameType.ProjectNetwork, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), networkId: gax::GaxPreconditions.CheckNotNullOrEmpty(networkId, nameof(networkId))) + { + } + + /// 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 Network ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string NetworkId { 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.ProjectNetwork: return s_projectNetwork.Expand(ProjectId, NetworkId); + 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 NetworkName); + + /// + public bool Equals(NetworkName 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 ==(NetworkName a, NetworkName 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 !=(NetworkName a, NetworkName b) => !(a == b); + } + + /// Resource name for the ServiceAttachment resource. + public sealed partial class ServiceAttachmentName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + ProjectRegionServiceAttachment = 1, + } + + private static gax::PathTemplate s_projectRegionServiceAttachment = new gax::PathTemplate("projects/{project}/regions/{region}/serviceAttachments/{service_attachment}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ServiceAttachmentName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ServiceAttachmentName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ServiceAttachmentName FromProjectRegionServiceAttachment(string projectId, string regionId, string serviceAttachmentId) => + new ServiceAttachmentName(ResourceNameType.ProjectRegionServiceAttachment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), serviceAttachmentId: gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + public static string Format(string projectId, string regionId, string serviceAttachmentId) => + FormatProjectRegionServiceAttachment(projectId, regionId, serviceAttachmentId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment}. + /// + public static string FormatProjectRegionServiceAttachment(string projectId, string regionId, string serviceAttachmentId) => + s_projectRegionServiceAttachment.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))); + + /// + /// 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ServiceAttachmentName Parse(string serviceAttachmentName) => Parse(serviceAttachmentName, 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// 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 ServiceAttachmentName Parse(string serviceAttachmentName, bool allowUnparsed) => + TryParse(serviceAttachmentName, allowUnparsed, out ServiceAttachmentName 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// + /// 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 serviceAttachmentName, out ServiceAttachmentName result) => + TryParse(serviceAttachmentName, 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}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// + /// + /// 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 serviceAttachmentName, bool allowUnparsed, out ServiceAttachmentName result) + { + gax::GaxPreconditions.CheckNotNull(serviceAttachmentName, nameof(serviceAttachmentName)); + gax::TemplatedResourceName resourceName; + if (s_projectRegionServiceAttachment.TryParseName(serviceAttachmentName, out resourceName)) + { + result = FromProjectRegionServiceAttachment(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(serviceAttachmentName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ServiceAttachmentName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string projectId = null, string regionId = null, string serviceAttachmentId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ProjectId = projectId; + RegionId = regionId; + ServiceAttachmentId = serviceAttachmentId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + /// + /// The Project ID. Must not be null or empty. + /// The Region ID. Must not be null or empty. + /// The ServiceAttachment ID. Must not be null or empty. + public ServiceAttachmentName(string projectId, string regionId, string serviceAttachmentId) : this(ResourceNameType.ProjectRegionServiceAttachment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), regionId: gax::GaxPreconditions.CheckNotNullOrEmpty(regionId, nameof(regionId)), serviceAttachmentId: gax::GaxPreconditions.CheckNotNullOrEmpty(serviceAttachmentId, nameof(serviceAttachmentId))) + { + } + + /// 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 Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// + /// The Region ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string RegionId { get; } + + /// + /// The ServiceAttachment ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ServiceAttachmentId { 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.ProjectRegionServiceAttachment: return s_projectRegionServiceAttachment.Expand(ProjectId, RegionId, ServiceAttachmentId); + 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 ServiceAttachmentName); + + /// + public bool Equals(ServiceAttachmentName 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 ==(ServiceAttachmentName a, ServiceAttachmentName 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 !=(ServiceAttachmentName a, ServiceAttachmentName b) => !(a == b); + } + + public partial class Instance + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class PscAutoConnection + { + /// + /// -typed view over the resource name property. + /// + public ForwardingRuleName ForwardingRuleAsForwardingRuleName + { + get => string.IsNullOrEmpty(ForwardingRule) ? null : ForwardingRuleName.Parse(ForwardingRule, allowUnparsed: true); + set => ForwardingRule = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name + /// property. + /// + public ServiceAttachmentName ServiceAttachmentAsServiceAttachmentName + { + get => string.IsNullOrEmpty(ServiceAttachment) ? null : ServiceAttachmentName.Parse(ServiceAttachment, allowUnparsed: true); + set => ServiceAttachment = value?.ToString() ?? ""; + } + } + + public partial class PscConnection + { + /// + /// -typed view over the resource name property. + /// + public ForwardingRuleName ForwardingRuleAsForwardingRuleName + { + get => string.IsNullOrEmpty(ForwardingRule) ? null : ForwardingRuleName.Parse(ForwardingRule, allowUnparsed: true); + set => ForwardingRule = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + + /// + /// -typed view over the resource name + /// property. + /// + public ServiceAttachmentName ServiceAttachmentAsServiceAttachmentName + { + get => string.IsNullOrEmpty(ServiceAttachment) ? null : ServiceAttachmentName.Parse(ServiceAttachment, allowUnparsed: true); + set => ServiceAttachment = value?.ToString() ?? ""; + } + } + + public partial class DiscoveryEndpoint + { + /// + /// -typed view over the resource name property. + /// + public NetworkName NetworkAsNetworkName + { + get => string.IsNullOrEmpty(Network) ? null : NetworkName.Parse(Network, allowUnparsed: true); + set => Network = value?.ToString() ?? ""; + } + } + + public partial class ListInstancesRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CreateInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class DeleteInstanceRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class GetCertificateAuthorityRequest + { + /// + /// -typed view over the resource name property. + /// + public gcmv::InstanceName InstanceName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::InstanceName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class CertificateAuthority + { + /// + /// -typed view over the resource name property. + /// + public gcmv::CertificateAuthorityName CertificateAuthorityName + { + get => string.IsNullOrEmpty(Name) ? null : gcmv::CertificateAuthorityName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/PackageApiMetadata.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/PackageApiMetadata.g.cs new file mode 100644 index 000000000000..dc1d1536b3d7 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/PackageApiMetadata.g.cs @@ -0,0 +1,74 @@ +// Copyright 2025 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 gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; + +namespace Google.Cloud.Memorystore.V1Beta +{ + /// 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.Memorystore.V1Beta", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true) + .WithHttpRuleOverrides(new scg::Dictionary + { + { + "google.cloud.location.Locations.GetLocation", + // { "get": "/v1beta/{name=projects/*/locations/*}" } + proto::ByteString.FromBase64("EiUvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyp9") + }, + { + "google.cloud.location.Locations.ListLocations", + // { "get": "/v1beta/{name=projects/*}/locations" } + proto::ByteString.FromBase64("EiMvdjFiZXRhL3tuYW1lPXByb2plY3RzLyp9L2xvY2F0aW9ucw==") + }, + { + "google.longrunning.Operations.CancelOperation", + // { "post": "/v1beta/{name=projects/*/locations/*/operations/*}:cancel" } + proto::ByteString.FromBase64("IjkvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyovb3BlcmF0aW9ucy8qfTpjYW5jZWw=") + }, + { + "google.longrunning.Operations.DeleteOperation", + // { "delete": "/v1beta/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("KjIvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyovb3BlcmF0aW9ucy8qfQ==") + }, + { + "google.longrunning.Operations.GetOperation", + // { "get": "/v1beta/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("EjIvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyovb3BlcmF0aW9ucy8qfQ==") + }, + { + "google.longrunning.Operations.ListOperations", + // { "get": "/v1beta/{name=projects/*/locations/*}/operations" } + proto::ByteString.FromBase64("EjAvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyp9L29wZXJhdGlvbnM=") + }, + }); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return gcl::LocationsReflection.Descriptor; + yield return MemorystoreReflection.Descriptor; + yield return lro::OperationsReflection.Descriptor; + } + } +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/ServiceCollectionExtensions.g.cs b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/ServiceCollectionExtensions.g.cs new file mode 100644 index 000000000000..7f2b02b89063 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/Google.Cloud.Memorystore.V1Beta/ServiceCollectionExtensions.g.cs @@ -0,0 +1,64 @@ +// Copyright 2025 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 gcl = Google.Cloud.Location; +using gcmv = Google.Cloud.Memorystore.V1Beta; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sys = System; + +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 AddMemorystoreClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcmv::MemorystoreClientBuilder builder = new gcmv::MemorystoreClientBuilder(); + 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 AddMemorystoreClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcmv::MemorystoreClientBuilder builder = new gcmv::MemorystoreClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/apis/Google.Cloud.Memorystore.V1Beta/gapic_metadata.json b/apis/Google.Cloud.Memorystore.V1Beta/gapic_metadata.json new file mode 100644 index 000000000000..6cb8fe99df17 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/gapic_metadata.json @@ -0,0 +1,54 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "csharp", + "protoPackage": "google.cloud.memorystore.v1beta", + "libraryPackage": "Google.Cloud.Memorystore.V1Beta", + "services": { + "Memorystore": { + "clients": { + "grpc": { + "libraryClient": "MemorystoreClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "CreateInstance", + "CreateInstanceAsync" + ] + }, + "DeleteInstance": { + "methods": [ + "DeleteInstance", + "DeleteInstanceAsync" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "GetCertificateAuthority", + "GetCertificateAuthorityAsync" + ] + }, + "GetInstance": { + "methods": [ + "GetInstance", + "GetInstanceAsync" + ] + }, + "ListInstances": { + "methods": [ + "ListInstances", + "ListInstancesAsync" + ] + }, + "UpdateInstance": { + "methods": [ + "UpdateInstance", + "UpdateInstanceAsync" + ] + } + } + } + } + } + } +} From 731eb21714540489f5f5d1d7a002b9a09310485a Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:19:39 +0000 Subject: [PATCH 5/6] tests: Add smoke test for Google.Cloud.Memorystore.V1 --- apis/Google.Cloud.Memorystore.V1/smoketests.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 apis/Google.Cloud.Memorystore.V1/smoketests.json diff --git a/apis/Google.Cloud.Memorystore.V1/smoketests.json b/apis/Google.Cloud.Memorystore.V1/smoketests.json new file mode 100644 index 000000000000..be6a78976d46 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1/smoketests.json @@ -0,0 +1,9 @@ +[ + { + "method": "ListInstances", + "client": "MemorystoreClient", + "arguments": { + "parent": "projects/${PROJECT_ID}/locations/us-east1" + } + } +] \ No newline at end of file From 3ea43f5af83f245ee878f2d40d39a8364af11312 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jan 2025 08:30:23 +0000 Subject: [PATCH 6/6] tests: Add smoke test for Google.Cloud.Memorystore.V1Beta --- apis/Google.Cloud.Memorystore.V1Beta/smoketests.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 apis/Google.Cloud.Memorystore.V1Beta/smoketests.json diff --git a/apis/Google.Cloud.Memorystore.V1Beta/smoketests.json b/apis/Google.Cloud.Memorystore.V1Beta/smoketests.json new file mode 100644 index 000000000000..be6a78976d46 --- /dev/null +++ b/apis/Google.Cloud.Memorystore.V1Beta/smoketests.json @@ -0,0 +1,9 @@ +[ + { + "method": "ListInstances", + "client": "MemorystoreClient", + "arguments": { + "parent": "projects/${PROJECT_ID}/locations/us-east1" + } + } +] \ No newline at end of file