diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Snippets/EkmServiceClientSnippets.g.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Snippets/EkmServiceClientSnippets.g.cs
new file mode 100644
index 000000000000..af549552b071
--- /dev/null
+++ b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Snippets/EkmServiceClientSnippets.g.cs
@@ -0,0 +1,559 @@
+// Copyright 2022 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 Google.Cloud.Kms.V1.Snippets
+{
+ using Google.Api.Gax;
+ using Google.Api.Gax.ResourceNames;
+ using Google.Protobuf.WellKnownTypes;
+ using System;
+ using System.Linq;
+ using System.Threading.Tasks;
+
+ /// Generated snippets.
+ public sealed class GeneratedEkmServiceClientSnippets
+ {
+ /// Snippet for ListEkmConnections
+ public void ListEkmConnectionsRequestObject()
+ {
+ // Snippet: ListEkmConnections(ListEkmConnectionsRequest, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ ListEkmConnectionsRequest request = new ListEkmConnectionsRequest
+ {
+ ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ Filter = "",
+ OrderBy = "",
+ };
+ // Make the request
+ PagedEnumerable response = ekmServiceClient.ListEkmConnections(request);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 ListEkmConnectionsAsync
+ public async Task ListEkmConnectionsRequestObjectAsync()
+ {
+ // Snippet: ListEkmConnectionsAsync(ListEkmConnectionsRequest, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ ListEkmConnectionsRequest request = new ListEkmConnectionsRequest
+ {
+ ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ Filter = "",
+ OrderBy = "",
+ };
+ // Make the request
+ PagedAsyncEnumerable response = ekmServiceClient.ListEkmConnectionsAsync(request);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 ListEkmConnections
+ public void ListEkmConnections()
+ {
+ // Snippet: ListEkmConnections(string, string, int?, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ string parent = "projects/[PROJECT]/locations/[LOCATION]";
+ // Make the request
+ PagedEnumerable response = ekmServiceClient.ListEkmConnections(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 ListEkmConnectionsAsync
+ public async Task ListEkmConnectionsAsync()
+ {
+ // Snippet: ListEkmConnectionsAsync(string, string, int?, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ string parent = "projects/[PROJECT]/locations/[LOCATION]";
+ // Make the request
+ PagedAsyncEnumerable response = ekmServiceClient.ListEkmConnectionsAsync(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 ListEkmConnections
+ public void ListEkmConnectionsResourceNames()
+ {
+ // Snippet: ListEkmConnections(LocationName, string, int?, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
+ // Make the request
+ PagedEnumerable response = ekmServiceClient.ListEkmConnections(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 ListEkmConnectionsAsync
+ public async Task ListEkmConnectionsResourceNamesAsync()
+ {
+ // Snippet: ListEkmConnectionsAsync(LocationName, string, int?, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
+ // Make the request
+ PagedAsyncEnumerable response = ekmServiceClient.ListEkmConnectionsAsync(parent);
+
+ // Iterate over all response items, lazily performing RPCs as required
+ await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
+ {
+ // Do something with each page of items
+ Console.WriteLine("A page of results:");
+ foreach (EkmConnection 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 (EkmConnection 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 GetEkmConnection
+ public void GetEkmConnectionRequestObject()
+ {
+ // Snippet: GetEkmConnection(GetEkmConnectionRequest, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ // Make the request
+ EkmConnection response = ekmServiceClient.GetEkmConnection(request);
+ // End snippet
+ }
+
+ /// Snippet for GetEkmConnectionAsync
+ public async Task GetEkmConnectionRequestObjectAsync()
+ {
+ // Snippet: GetEkmConnectionAsync(GetEkmConnectionRequest, CallSettings)
+ // Additional: GetEkmConnectionAsync(GetEkmConnectionRequest, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ // Make the request
+ EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for GetEkmConnection
+ public void GetEkmConnection()
+ {
+ // Snippet: GetEkmConnection(string, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
+ // Make the request
+ EkmConnection response = ekmServiceClient.GetEkmConnection(name);
+ // End snippet
+ }
+
+ /// Snippet for GetEkmConnectionAsync
+ public async Task GetEkmConnectionAsync()
+ {
+ // Snippet: GetEkmConnectionAsync(string, CallSettings)
+ // Additional: GetEkmConnectionAsync(string, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
+ // Make the request
+ EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
+ // End snippet
+ }
+
+ /// Snippet for GetEkmConnection
+ public void GetEkmConnectionResourceNames()
+ {
+ // Snippet: GetEkmConnection(EkmConnectionName, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
+ // Make the request
+ EkmConnection response = ekmServiceClient.GetEkmConnection(name);
+ // End snippet
+ }
+
+ /// Snippet for GetEkmConnectionAsync
+ public async Task GetEkmConnectionResourceNamesAsync()
+ {
+ // Snippet: GetEkmConnectionAsync(EkmConnectionName, CallSettings)
+ // Additional: GetEkmConnectionAsync(EkmConnectionName, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
+ // Make the request
+ EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnection
+ public void CreateEkmConnectionRequestObject()
+ {
+ // Snippet: CreateEkmConnection(CreateEkmConnectionRequest, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "",
+ EkmConnection = new EkmConnection(),
+ };
+ // Make the request
+ EkmConnection response = ekmServiceClient.CreateEkmConnection(request);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnectionAsync
+ public async Task CreateEkmConnectionRequestObjectAsync()
+ {
+ // Snippet: CreateEkmConnectionAsync(CreateEkmConnectionRequest, CallSettings)
+ // Additional: CreateEkmConnectionAsync(CreateEkmConnectionRequest, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "",
+ EkmConnection = new EkmConnection(),
+ };
+ // Make the request
+ EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnection
+ public void CreateEkmConnection()
+ {
+ // Snippet: CreateEkmConnection(string, string, EkmConnection, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ string parent = "projects/[PROJECT]/locations/[LOCATION]";
+ string ekmConnectionId = "";
+ EkmConnection ekmConnection = new EkmConnection();
+ // Make the request
+ EkmConnection response = ekmServiceClient.CreateEkmConnection(parent, ekmConnectionId, ekmConnection);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnectionAsync
+ public async Task CreateEkmConnectionAsync()
+ {
+ // Snippet: CreateEkmConnectionAsync(string, string, EkmConnection, CallSettings)
+ // Additional: CreateEkmConnectionAsync(string, string, EkmConnection, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ string parent = "projects/[PROJECT]/locations/[LOCATION]";
+ string ekmConnectionId = "";
+ EkmConnection ekmConnection = new EkmConnection();
+ // Make the request
+ EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnection
+ public void CreateEkmConnectionResourceNames()
+ {
+ // Snippet: CreateEkmConnection(LocationName, string, EkmConnection, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
+ string ekmConnectionId = "";
+ EkmConnection ekmConnection = new EkmConnection();
+ // Make the request
+ EkmConnection response = ekmServiceClient.CreateEkmConnection(parent, ekmConnectionId, ekmConnection);
+ // End snippet
+ }
+
+ /// Snippet for CreateEkmConnectionAsync
+ public async Task CreateEkmConnectionResourceNamesAsync()
+ {
+ // Snippet: CreateEkmConnectionAsync(LocationName, string, EkmConnection, CallSettings)
+ // Additional: CreateEkmConnectionAsync(LocationName, string, EkmConnection, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
+ string ekmConnectionId = "";
+ EkmConnection ekmConnection = new EkmConnection();
+ // Make the request
+ EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
+ // End snippet
+ }
+
+ /// Snippet for UpdateEkmConnection
+ public void UpdateEkmConnectionRequestObject()
+ {
+ // Snippet: UpdateEkmConnection(UpdateEkmConnectionRequest, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new FieldMask(),
+ };
+ // Make the request
+ EkmConnection response = ekmServiceClient.UpdateEkmConnection(request);
+ // End snippet
+ }
+
+ /// Snippet for UpdateEkmConnectionAsync
+ public async Task UpdateEkmConnectionRequestObjectAsync()
+ {
+ // Snippet: UpdateEkmConnectionAsync(UpdateEkmConnectionRequest, CallSettings)
+ // Additional: UpdateEkmConnectionAsync(UpdateEkmConnectionRequest, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new FieldMask(),
+ };
+ // Make the request
+ EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(request);
+ // End snippet
+ }
+
+ /// Snippet for UpdateEkmConnection
+ public void UpdateEkmConnection()
+ {
+ // Snippet: UpdateEkmConnection(EkmConnection, FieldMask, CallSettings)
+ // Create client
+ EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
+ // Initialize request argument(s)
+ EkmConnection ekmConnection = new EkmConnection();
+ FieldMask updateMask = new FieldMask();
+ // Make the request
+ EkmConnection response = ekmServiceClient.UpdateEkmConnection(ekmConnection, updateMask);
+ // End snippet
+ }
+
+ /// Snippet for UpdateEkmConnectionAsync
+ public async Task UpdateEkmConnectionAsync()
+ {
+ // Snippet: UpdateEkmConnectionAsync(EkmConnection, FieldMask, CallSettings)
+ // Additional: UpdateEkmConnectionAsync(EkmConnection, FieldMask, CancellationToken)
+ // Create client
+ EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
+ // Initialize request argument(s)
+ EkmConnection ekmConnection = new EkmConnection();
+ FieldMask updateMask = new FieldMask();
+ // Make the request
+ EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(ekmConnection, updateMask);
+ // End snippet
+ }
+ }
+}
diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/EkmServiceClientTest.g.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/EkmServiceClientTest.g.cs
new file mode 100644
index 000000000000..05451d22b132
--- /dev/null
+++ b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/EkmServiceClientTest.g.cs
@@ -0,0 +1,463 @@
+// Copyright 2022 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!
+
+using gaxgrpc = Google.Api.Gax.Grpc;
+using gagr = Google.Api.Gax.ResourceNames;
+using wkt = Google.Protobuf.WellKnownTypes;
+using grpccore = Grpc.Core;
+using moq = Moq;
+using st = System.Threading;
+using stt = System.Threading.Tasks;
+using xunit = Xunit;
+
+namespace Google.Cloud.Kms.V1.Tests
+{
+ /// Generated unit tests.
+ public sealed class GeneratedEkmServiceClientTest
+ {
+ [xunit::FactAttribute]
+ public void GetEkmConnectionRequestObject()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.GetEkmConnection(request);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task GetEkmConnectionRequestObjectAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.GetEkmConnectionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.GetEkmConnectionAsync(request, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void GetEkmConnection()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.GetEkmConnection(request.Name);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task GetEkmConnectionAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.GetEkmConnectionAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.GetEkmConnectionAsync(request.Name, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void GetEkmConnectionResourceNames()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.GetEkmConnection(request.EkmConnectionName);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task GetEkmConnectionResourceNamesAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ GetEkmConnectionRequest request = new GetEkmConnectionRequest
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.GetEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.GetEkmConnectionAsync(request.EkmConnectionName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.GetEkmConnectionAsync(request.EkmConnectionName, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void CreateEkmConnectionRequestObject()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.CreateEkmConnection(request);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task CreateEkmConnectionRequestObjectAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.CreateEkmConnectionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.CreateEkmConnectionAsync(request, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void CreateEkmConnection()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.CreateEkmConnection(request.Parent, request.EkmConnectionId, request.EkmConnection);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task CreateEkmConnectionAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.CreateEkmConnectionAsync(request.Parent, request.EkmConnectionId, request.EkmConnection, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.CreateEkmConnectionAsync(request.Parent, request.EkmConnectionId, request.EkmConnection, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void CreateEkmConnectionResourceNames()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.CreateEkmConnection(request.ParentAsLocationName, request.EkmConnectionId, request.EkmConnection);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task CreateEkmConnectionResourceNamesAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
+ {
+ ParentAsLocationName = gagr::LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
+ EkmConnectionId = "ekm_connection_id1bd1ac0c",
+ EkmConnection = new EkmConnection(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.CreateEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.CreateEkmConnectionAsync(request.ParentAsLocationName, request.EkmConnectionId, request.EkmConnection, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.CreateEkmConnectionAsync(request.ParentAsLocationName, request.EkmConnectionId, request.EkmConnection, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void UpdateEkmConnectionRequestObject()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new wkt::FieldMask(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.UpdateEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.UpdateEkmConnection(request);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task UpdateEkmConnectionRequestObjectAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new wkt::FieldMask(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.UpdateEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.UpdateEkmConnectionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.UpdateEkmConnectionAsync(request, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public void UpdateEkmConnection()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new wkt::FieldMask(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.UpdateEkmConnection(request, moq::It.IsAny())).Returns(expectedResponse);
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection response = client.UpdateEkmConnection(request.EkmConnection, request.UpdateMask);
+ xunit::Assert.Same(expectedResponse, response);
+ mockGrpcClient.VerifyAll();
+ }
+
+ [xunit::FactAttribute]
+ public async stt::Task UpdateEkmConnectionAsync()
+ {
+ moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict);
+ UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
+ {
+ EkmConnection = new EkmConnection(),
+ UpdateMask = new wkt::FieldMask(),
+ };
+ EkmConnection expectedResponse = new EkmConnection
+ {
+ EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
+ CreateTime = new wkt::Timestamp(),
+ ServiceResolvers =
+ {
+ new EkmConnection.Types.ServiceResolver(),
+ },
+ Etag = "etage8ad7218",
+ };
+ mockGrpcClient.Setup(x => x.UpdateEkmConnectionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
+ EkmServiceClient client = new EkmServiceClientImpl(mockGrpcClient.Object, null);
+ EkmConnection responseCallSettings = await client.UpdateEkmConnectionAsync(request.EkmConnection, request.UpdateMask, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));
+ xunit::Assert.Same(expectedResponse, responseCallSettings);
+ EkmConnection responseCancellationToken = await client.UpdateEkmConnectionAsync(request.EkmConnection, request.UpdateMask, st::CancellationToken.None);
+ xunit::Assert.Same(expectedResponse, responseCancellationToken);
+ mockGrpcClient.VerifyAll();
+ }
+ }
+}
diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/KeyManagementServiceClientTest.g.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/KeyManagementServiceClientTest.g.cs
index df6faa5bbe55..36e9ec53a077 100644
--- a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/KeyManagementServiceClientTest.g.cs
+++ b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1.Tests/KeyManagementServiceClientTest.g.cs
@@ -182,6 +182,7 @@ public void GetCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -216,6 +217,7 @@ public void GetCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -252,6 +254,7 @@ public void GetCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -286,6 +289,7 @@ public void GetCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -322,6 +326,7 @@ public void GetCryptoKeyResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -356,6 +361,7 @@ public void GetCryptoKeyResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.GetCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -381,7 +387,7 @@ public void GetCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -413,7 +419,7 @@ public void GetCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -447,7 +453,7 @@ public void GetCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -479,7 +485,7 @@ public void GetCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -513,7 +519,7 @@ public void GetCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -545,7 +551,7 @@ public void GetCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -578,7 +584,7 @@ public void GetPublicKeyRequestObject()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -601,7 +607,7 @@ public void GetPublicKeyRequestObject()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -626,7 +632,7 @@ public void GetPublicKey()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -649,7 +655,7 @@ public void GetPublicKey()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -674,7 +680,7 @@ public void GetPublicKeyResourceNames()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -697,7 +703,7 @@ public void GetPublicKeyResourceNames()
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
PemCrc32C = 7888183666447720391L,
PublicKeyName = PublicKeyName.FromProjectLocationKeyRingCryptoKeyCryptoKeyVersion("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.GetPublicKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -726,7 +732,7 @@ public void GetImportJobRequestObject()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -754,7 +760,7 @@ public void GetImportJobRequestObject()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -784,7 +790,7 @@ public void GetImportJob()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -812,7 +818,7 @@ public void GetImportJob()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -842,7 +848,7 @@ public void GetImportJobResourceNames()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -870,7 +876,7 @@ public void GetImportJobResourceNames()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.GetImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -1049,6 +1055,7 @@ public void CreateCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1086,6 +1093,7 @@ public void CreateCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1124,6 +1132,7 @@ public void CreateCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1160,6 +1169,7 @@ public void CreateCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1198,6 +1208,7 @@ public void CreateCryptoKeyResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1234,6 +1245,7 @@ public void CreateCryptoKeyResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.CreateCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1260,7 +1272,7 @@ public void CreateCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1293,7 +1305,7 @@ public void CreateCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1328,7 +1340,7 @@ public void CreateCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1361,7 +1373,7 @@ public void CreateCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1396,7 +1408,7 @@ public void CreateCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1429,7 +1441,7 @@ public void CreateCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1467,7 +1479,7 @@ public void ImportCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1503,7 +1515,7 @@ public void ImportCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1542,7 +1554,7 @@ public void CreateImportJobRequestObject()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -1572,7 +1584,7 @@ public void CreateImportJobRequestObject()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -1604,7 +1616,7 @@ public void CreateImportJob()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -1634,7 +1646,7 @@ public void CreateImportJob()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -1666,7 +1678,7 @@ public void CreateImportJobResourceNames()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJob(request, moq::It.IsAny())).Returns(expectedResponse);
@@ -1696,7 +1708,7 @@ public void CreateImportJobResourceNames()
State = ImportJob.Types.ImportJobState.Active,
PublicKey = new ImportJob.Types.WrappingPublicKey(),
Attestation = new KeyOperationAttestation(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
ExpireEventTime = new wkt::Timestamp(),
};
mockGrpcClient.Setup(x => x.CreateImportJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
@@ -1735,6 +1747,7 @@ public void UpdateCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1770,6 +1783,7 @@ public void UpdateCryptoKeyRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1807,6 +1821,7 @@ public void UpdateCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKey(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1842,6 +1857,7 @@ public void UpdateCryptoKey()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -1868,7 +1884,7 @@ public void UpdateCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1901,7 +1917,7 @@ public void UpdateCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1936,7 +1952,7 @@ public void UpdateCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -1969,7 +1985,7 @@ public void UpdateCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2015,6 +2031,7 @@ public void UpdateCryptoKeyPrimaryVersionRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersion(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2050,6 +2067,7 @@ public void UpdateCryptoKeyPrimaryVersionRequestObject()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2087,6 +2105,7 @@ public void UpdateCryptoKeyPrimaryVersion()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersion(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2122,6 +2141,7 @@ public void UpdateCryptoKeyPrimaryVersion()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2159,6 +2179,7 @@ public void UpdateCryptoKeyPrimaryVersionResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersion(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2194,6 +2215,7 @@ public void UpdateCryptoKeyPrimaryVersionResourceNames()
VersionTemplate = new CryptoKeyVersionTemplate(),
ImportOnly = false,
DestroyScheduledDuration = new wkt::Duration(),
+ CryptoKeyBackendAsResourceName = new gax::UnparsedResourceName("a/wildcard/resource"),
};
mockGrpcClient.Setup(x => x.UpdateCryptoKeyPrimaryVersionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2219,7 +2241,7 @@ public void DestroyCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2251,7 +2273,7 @@ public void DestroyCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2285,7 +2307,7 @@ public void DestroyCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2317,7 +2339,7 @@ public void DestroyCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2351,7 +2373,7 @@ public void DestroyCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2383,7 +2405,7 @@ public void DestroyCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2417,7 +2439,7 @@ public void RestoreCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2449,7 +2471,7 @@ public void RestoreCryptoKeyVersionRequestObject()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2483,7 +2505,7 @@ public void RestoreCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2515,7 +2537,7 @@ public void RestoreCryptoKeyVersion()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2549,7 +2571,7 @@ public void RestoreCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2581,7 +2603,7 @@ public void RestoreCryptoKeyVersionResourceNames()
CreateTime = new wkt::Timestamp(),
DestroyTime = new wkt::Timestamp(),
DestroyEventTime = new wkt::Timestamp(),
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
Attestation = new KeyOperationAttestation(),
Algorithm = CryptoKeyVersion.Types.CryptoKeyVersionAlgorithm.RsaDecryptOaep4096Sha512,
GenerateTime = new wkt::Timestamp(),
@@ -2619,7 +2641,7 @@ public void EncryptRequestObject()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Encrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2647,7 +2669,7 @@ public void EncryptRequestObject()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.EncryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2674,7 +2696,7 @@ public void Encrypt()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Encrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2699,7 +2721,7 @@ public void Encrypt()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.EncryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2726,7 +2748,7 @@ public void EncryptResourceNames()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Encrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2751,7 +2773,7 @@ public void EncryptResourceNames()
CiphertextCrc32C = 5835079685918568182L,
VerifiedPlaintextCrc32C = false,
VerifiedAdditionalAuthenticatedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.EncryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2779,7 +2801,7 @@ public void DecryptRequestObject()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Decrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2805,7 +2827,7 @@ public void DecryptRequestObject()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.DecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2830,7 +2852,7 @@ public void Decrypt()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Decrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2853,7 +2875,7 @@ public void Decrypt()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.DecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2878,7 +2900,7 @@ public void DecryptResourceNames()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.Decrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2901,7 +2923,7 @@ public void DecryptResourceNames()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
UsedPrimary = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.DecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2931,7 +2953,7 @@ public void AsymmetricSignRequestObject()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2959,7 +2981,7 @@ public void AsymmetricSignRequestObject()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -2986,7 +3008,7 @@ public void AsymmetricSign()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3011,7 +3033,7 @@ public void AsymmetricSign()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3038,7 +3060,7 @@ public void AsymmetricSignResourceNames()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3063,7 +3085,7 @@ public void AsymmetricSignResourceNames()
VerifiedDigestCrc32C = true,
Name = "name1c9368b0",
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3089,7 +3111,7 @@ public void AsymmetricDecryptRequestObject()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3113,7 +3135,7 @@ public void AsymmetricDecryptRequestObject()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3138,7 +3160,7 @@ public void AsymmetricDecrypt()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3161,7 +3183,7 @@ public void AsymmetricDecrypt()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3186,7 +3208,7 @@ public void AsymmetricDecryptResourceNames()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecrypt(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3209,7 +3231,7 @@ public void AsymmetricDecryptResourceNames()
Plaintext = proto::ByteString.CopyFromUtf8("plaintext1d5bbcf2"),
PlaintextCrc32C = -5108784857370523788L,
VerifiedCiphertextCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.AsymmetricDecryptAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3236,7 +3258,7 @@ public void MacSignRequestObject()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3261,7 +3283,7 @@ public void MacSignRequestObject()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3287,7 +3309,7 @@ public void MacSign()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3311,7 +3333,7 @@ public void MacSign()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3337,7 +3359,7 @@ public void MacSignResourceNames()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSign(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3361,7 +3383,7 @@ public void MacSignResourceNames()
Mac = proto::ByteString.CopyFromUtf8("mac121f0c14"),
MacCrc32C = 8296593316352450800L,
VerifiedDataCrc32C = true,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacSignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3391,7 +3413,7 @@ public void MacVerifyRequestObject()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerify(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3419,7 +3441,7 @@ public void MacVerifyRequestObject()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerifyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3447,7 +3469,7 @@ public void MacVerify()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerify(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3473,7 +3495,7 @@ public void MacVerify()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerifyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3501,7 +3523,7 @@ public void MacVerifyResourceNames()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerify(request, moq::It.IsAny())).Returns(expectedResponse);
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3527,7 +3549,7 @@ public void MacVerifyResourceNames()
VerifiedDataCrc32C = true,
VerifiedMacCrc32C = false,
VerifiedSuccessIntegrity = false,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
mockGrpcClient.Setup(x => x.MacVerifyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null));
KeyManagementServiceClient client = new KeyManagementServiceClientImpl(mockGrpcClient.Object, null);
@@ -3546,7 +3568,7 @@ public void GenerateRandomBytesRequestObject()
{
Location = "locatione09d18d5",
LengthBytes = 1939961421,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
GenerateRandomBytesResponse expectedResponse = new GenerateRandomBytesResponse
{
@@ -3568,7 +3590,7 @@ public void GenerateRandomBytesRequestObject()
{
Location = "locatione09d18d5",
LengthBytes = 1939961421,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
GenerateRandomBytesResponse expectedResponse = new GenerateRandomBytesResponse
{
@@ -3592,7 +3614,7 @@ public void GenerateRandomBytes()
{
Location = "locatione09d18d5",
LengthBytes = 1939961421,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
GenerateRandomBytesResponse expectedResponse = new GenerateRandomBytesResponse
{
@@ -3614,7 +3636,7 @@ public void GenerateRandomBytes()
{
Location = "locatione09d18d5",
LengthBytes = 1939961421,
- ProtectionLevel = ProtectionLevel.Hsm,
+ ProtectionLevel = ProtectionLevel.ExternalVpc,
};
GenerateRandomBytesResponse expectedResponse = new GenerateRandomBytesResponse
{
diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmService.g.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmService.g.cs
new file mode 100644
index 000000000000..bf8f696dbac3
--- /dev/null
+++ b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmService.g.cs
@@ -0,0 +1,2673 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/kms/v1/ekm_service.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#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.Kms.V1 {
+
+ /// Holder for reflection information generated from google/cloud/kms/v1/ekm_service.proto
+ public static partial class EkmServiceReflection {
+
+ #region Descriptor
+ /// File descriptor for google/cloud/kms/v1/ekm_service.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static EkmServiceReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiVnb29nbGUvY2xvdWQva21zL3YxL2VrbV9zZXJ2aWNlLnByb3RvEhNnb29n",
+ "bGUuY2xvdWQua21zLnYxGhxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3Rv",
+ "Ghdnb29nbGUvYXBpL2NsaWVudC5wcm90bxofZ29vZ2xlL2FwaS9maWVsZF9i",
+ "ZWhhdmlvci5wcm90bxoZZ29vZ2xlL2FwaS9yZXNvdXJjZS5wcm90bxogZ29v",
+ "Z2xlL3Byb3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aH2dvb2dsZS9wcm90b2J1",
+ "Zi90aW1lc3RhbXAucHJvdG8iswEKGUxpc3RFa21Db25uZWN0aW9uc1JlcXVl",
+ "c3QSOQoGcGFyZW50GAEgASgJQingQQL6QSMKIWxvY2F0aW9ucy5nb29nbGVh",
+ "cGlzLmNvbS9Mb2NhdGlvbhIWCglwYWdlX3NpemUYAiABKAVCA+BBARIXCgpw",
+ "YWdlX3Rva2VuGAMgASgJQgPgQQESEwoGZmlsdGVyGAQgASgJQgPgQQESFQoI",
+ "b3JkZXJfYnkYBSABKAlCA+BBASKGAQoaTGlzdEVrbUNvbm5lY3Rpb25zUmVz",
+ "cG9uc2USOwoPZWttX2Nvbm5lY3Rpb25zGAEgAygLMiIuZ29vZ2xlLmNsb3Vk",
+ "Lmttcy52MS5Fa21Db25uZWN0aW9uEhcKD25leHRfcGFnZV90b2tlbhgCIAEo",
+ "CRISCgp0b3RhbF9zaXplGAMgASgFIlYKF0dldEVrbUNvbm5lY3Rpb25SZXF1",
+ "ZXN0EjsKBG5hbWUYASABKAlCLeBBAvpBJwolY2xvdWRrbXMuZ29vZ2xlYXBp",
+ "cy5jb20vRWttQ29ubmVjdGlvbiK4AQoaQ3JlYXRlRWttQ29ubmVjdGlvblJl",
+ "cXVlc3QSOQoGcGFyZW50GAEgASgJQingQQL6QSMKIWxvY2F0aW9ucy5nb29n",
+ "bGVhcGlzLmNvbS9Mb2NhdGlvbhIeChFla21fY29ubmVjdGlvbl9pZBgCIAEo",
+ "CUID4EECEj8KDmVrbV9jb25uZWN0aW9uGAMgASgLMiIuZ29vZ2xlLmNsb3Vk",
+ "Lmttcy52MS5Fa21Db25uZWN0aW9uQgPgQQIikwEKGlVwZGF0ZUVrbUNvbm5l",
+ "Y3Rpb25SZXF1ZXN0Ej8KDmVrbV9jb25uZWN0aW9uGAEgASgLMiIuZ29vZ2xl",
+ "LmNsb3VkLmttcy52MS5Fa21Db25uZWN0aW9uQgPgQQISNAoLdXBkYXRlX21h",
+ "c2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQIivwIK",
+ "C0NlcnRpZmljYXRlEhQKB3Jhd19kZXIYASABKAxCA+BBAhITCgZwYXJzZWQY",
+ "AiABKAhCA+BBAxITCgZpc3N1ZXIYAyABKAlCA+BBAxIUCgdzdWJqZWN0GAQg",
+ "ASgJQgPgQQMSKgodc3ViamVjdF9hbHRlcm5hdGl2ZV9kbnNfbmFtZXMYBSAD",
+ "KAlCA+BBAxI4Cg9ub3RfYmVmb3JlX3RpbWUYBiABKAsyGi5nb29nbGUucHJv",
+ "dG9idWYuVGltZXN0YW1wQgPgQQMSNwoObm90X2FmdGVyX3RpbWUYByABKAsy",
+ "Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSGgoNc2VyaWFsX251",
+ "bWJlchgIIAEoCUID4EEDEh8KEnNoYTI1Nl9maW5nZXJwcmludBgJIAEoCUID",
+ "4EEDIosECg1Fa21Db25uZWN0aW9uEhEKBG5hbWUYASABKAlCA+BBAxI0Cgtj",
+ "cmVhdGVfdGltZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBC",
+ "A+BBAxJNChFzZXJ2aWNlX3Jlc29sdmVycxgDIAMoCzIyLmdvb2dsZS5jbG91",
+ "ZC5rbXMudjEuRWttQ29ubmVjdGlvbi5TZXJ2aWNlUmVzb2x2ZXISDAoEZXRh",
+ "ZxgFIAEoCRreAQoPU2VydmljZVJlc29sdmVyElIKGXNlcnZpY2VfZGlyZWN0",
+ "b3J5X3NlcnZpY2UYASABKAlCL+BBAvpBKQonc2VydmljZWRpcmVjdG9yeS5n",
+ "b29nbGVhcGlzLmNvbS9TZXJ2aWNlEhwKD2VuZHBvaW50X2ZpbHRlchgCIAEo",
+ "CUID4EEBEhUKCGhvc3RuYW1lGAMgASgJQgPgQQISQgoTc2VydmVyX2NlcnRp",
+ "ZmljYXRlcxgEIAMoCzIgLmdvb2dsZS5jbG91ZC5rbXMudjEuQ2VydGlmaWNh",
+ "dGVCA+BBAjpz6kFwCiVjbG91ZGttcy5nb29nbGVhcGlzLmNvbS9Fa21Db25u",
+ "ZWN0aW9uEkdwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRpb25zL3tsb2NhdGlv",
+ "bn0vZWttQ29ubmVjdGlvbnMve2VrbV9jb25uZWN0aW9ufTKxBwoKRWttU2Vy",
+ "dmljZRK6AQoSTGlzdEVrbUNvbm5lY3Rpb25zEi4uZ29vZ2xlLmNsb3VkLmtt",
+ "cy52MS5MaXN0RWttQ29ubmVjdGlvbnNSZXF1ZXN0Gi8uZ29vZ2xlLmNsb3Vk",
+ "Lmttcy52MS5MaXN0RWttQ29ubmVjdGlvbnNSZXNwb25zZSJDgtPkkwI0EjIv",
+ "djEve3BhcmVudD1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qfS9la21Db25uZWN0",
+ "aW9uc9pBBnBhcmVudBKnAQoQR2V0RWttQ29ubmVjdGlvbhIsLmdvb2dsZS5j",
+ "bG91ZC5rbXMudjEuR2V0RWttQ29ubmVjdGlvblJlcXVlc3QaIi5nb29nbGUu",
+ "Y2xvdWQua21zLnYxLkVrbUNvbm5lY3Rpb24iQYLT5JMCNBIyL3YxL3tuYW1l",
+ "PXByb2plY3RzLyovbG9jYXRpb25zLyovZWttQ29ubmVjdGlvbnMvKn3aQQRu",
+ "YW1lEuABChNDcmVhdGVFa21Db25uZWN0aW9uEi8uZ29vZ2xlLmNsb3VkLmtt",
+ "cy52MS5DcmVhdGVFa21Db25uZWN0aW9uUmVxdWVzdBoiLmdvb2dsZS5jbG91",
+ "ZC5rbXMudjEuRWttQ29ubmVjdGlvbiJ0gtPkkwJEIjIvdjEve3BhcmVudD1w",
+ "cm9qZWN0cy8qL2xvY2F0aW9ucy8qfS9la21Db25uZWN0aW9uczoOZWttX2Nv",
+ "bm5lY3Rpb27aQSdwYXJlbnQsZWttX2Nvbm5lY3Rpb25faWQsZWttX2Nvbm5l",
+ "Y3Rpb24S4gEKE1VwZGF0ZUVrbUNvbm5lY3Rpb24SLy5nb29nbGUuY2xvdWQu",
+ "a21zLnYxLlVwZGF0ZUVrbUNvbm5lY3Rpb25SZXF1ZXN0GiIuZ29vZ2xlLmNs",
+ "b3VkLmttcy52MS5Fa21Db25uZWN0aW9uInaC0+STAlMyQS92MS97ZWttX2Nv",
+ "bm5lY3Rpb24ubmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2VrbUNvbm5l",
+ "Y3Rpb25zLyp9Og5la21fY29ubmVjdGlvbtpBGmVrbV9jb25uZWN0aW9uLHVw",
+ "ZGF0ZV9tYXNrGnTKQRdjbG91ZGttcy5nb29nbGVhcGlzLmNvbdJBV2h0dHBz",
+ "Oi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvY2xvdWQtcGxhdGZvcm0saHR0",
+ "cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9jbG91ZGttc0KSAgoXY29t",
+ "Lmdvb2dsZS5jbG91ZC5rbXMudjFCD0VrbVNlcnZpY2VQcm90b1ABWjZnb29n",
+ "bGUuZ29sYW5nLm9yZy9nZW5wcm90by9nb29nbGVhcGlzL2Nsb3VkL2ttcy92",
+ "MTtrbXP4AQGqAhNHb29nbGUuQ2xvdWQuS21zLlYxygITR29vZ2xlXENsb3Vk",
+ "XEttc1xWMepBfAonc2VydmljZWRpcmVjdG9yeS5nb29nbGVhcGlzLmNvbS9T",
+ "ZXJ2aWNlElFwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRpb25zL3tsb2NhdGlv",
+ "bn0vbmFtZXNwYWNlcy97bmFtZXNwYWNlfS9zZXJ2aWNlcy97c2VydmljZX1i",
+ "BnByb3RvMw=="));
+ 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.ResourceReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.ListEkmConnectionsRequest), global::Google.Cloud.Kms.V1.ListEkmConnectionsRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter", "OrderBy" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.ListEkmConnectionsResponse), global::Google.Cloud.Kms.V1.ListEkmConnectionsResponse.Parser, new[]{ "EkmConnections", "NextPageToken", "TotalSize" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.GetEkmConnectionRequest), global::Google.Cloud.Kms.V1.GetEkmConnectionRequest.Parser, new[]{ "Name" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.CreateEkmConnectionRequest), global::Google.Cloud.Kms.V1.CreateEkmConnectionRequest.Parser, new[]{ "Parent", "EkmConnectionId", "EkmConnection" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.UpdateEkmConnectionRequest), global::Google.Cloud.Kms.V1.UpdateEkmConnectionRequest.Parser, new[]{ "EkmConnection", "UpdateMask" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.Certificate), global::Google.Cloud.Kms.V1.Certificate.Parser, new[]{ "RawDer", "Parsed", "Issuer", "Subject", "SubjectAlternativeDnsNames", "NotBeforeTime", "NotAfterTime", "SerialNumber", "Sha256Fingerprint" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.EkmConnection), global::Google.Cloud.Kms.V1.EkmConnection.Parser, new[]{ "Name", "CreateTime", "ServiceResolvers", "Etag" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Kms.V1.EkmConnection.Types.ServiceResolver), global::Google.Cloud.Kms.V1.EkmConnection.Types.ServiceResolver.Parser, new[]{ "ServiceDirectoryService", "EndpointFilter", "Hostname", "ServerCertificates" }, null, null, null, null)})
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ ///
+ /// Request message for [KeyManagementService.ListEkmConnections][].
+ ///
+ public sealed partial class ListEkmConnectionsRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListEkmConnectionsRequest());
+ 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.Kms.V1.EkmServiceReflection.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 ListEkmConnectionsRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ListEkmConnectionsRequest(ListEkmConnectionsRequest 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 ListEkmConnectionsRequest Clone() {
+ return new ListEkmConnectionsRequest(this);
+ }
+
+ /// Field number for the "parent" field.
+ public const int ParentFieldNumber = 1;
+ private string parent_ = "";
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ /// `projects/*/locations/*`.
+ ///
+ [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. Optional limit on the number of
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the
+ /// response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can
+ /// subsequently be obtained by including the
+ /// [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]
+ /// in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via
+ /// [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token].
+ ///
+ [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. Only include resources that match the filter in the response. For
+ /// more information, see
+ /// [Sorting and filtering list
+ /// results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ ///
+ [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. Specify how the results should be sorted. If not specified, the
+ /// results will be sorted in the default order. For more information, see
+ /// [Sorting and filtering list
+ /// results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ ///
+ [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 ListEkmConnectionsRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(ListEkmConnectionsRequest 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(ListEkmConnectionsRequest 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 [KeyManagementService.ListEkmConnections][].
+ ///
+ public sealed partial class ListEkmConnectionsResponse : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListEkmConnectionsResponse());
+ 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.Kms.V1.EkmServiceReflection.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 ListEkmConnectionsResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ListEkmConnectionsResponse(ListEkmConnectionsResponse other) : this() {
+ ekmConnections_ = other.ekmConnections_.Clone();
+ nextPageToken_ = other.nextPageToken_;
+ totalSize_ = other.totalSize_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ListEkmConnectionsResponse Clone() {
+ return new ListEkmConnectionsResponse(this);
+ }
+
+ /// Field number for the "ekm_connections" field.
+ public const int EkmConnectionsFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_ekmConnections_codec
+ = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Kms.V1.EkmConnection.Parser);
+ private readonly pbc::RepeatedField ekmConnections_ = new pbc::RepeatedField();
+ ///
+ /// The list of [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField EkmConnections {
+ get { return ekmConnections_; }
+ }
+
+ /// Field number for the "next_page_token" field.
+ public const int NextPageTokenFieldNumber = 2;
+ private string nextPageToken_ = "";
+ ///
+ /// A token to retrieve next page of results. Pass this value in
+ /// [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token]
+ /// to retrieve the next page of results.
+ ///
+ [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 "total_size" field.
+ public const int TotalSizeFieldNumber = 3;
+ private int totalSize_;
+ ///
+ /// The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection]
+ /// that matched the query.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int TotalSize {
+ get { return totalSize_; }
+ set {
+ totalSize_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as ListEkmConnectionsResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(ListEkmConnectionsResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!ekmConnections_.Equals(other.ekmConnections_)) return false;
+ if (NextPageToken != other.NextPageToken) return false;
+ if (TotalSize != other.TotalSize) 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 ^= ekmConnections_.GetHashCode();
+ if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode();
+ if (TotalSize != 0) hash ^= TotalSize.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
+ ekmConnections_.WriteTo(output, _repeated_ekmConnections_codec);
+ if (NextPageToken.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(NextPageToken);
+ }
+ if (TotalSize != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(TotalSize);
+ }
+ 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) {
+ ekmConnections_.WriteTo(ref output, _repeated_ekmConnections_codec);
+ if (NextPageToken.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(NextPageToken);
+ }
+ if (TotalSize != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(TotalSize);
+ }
+ 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 += ekmConnections_.CalculateSize(_repeated_ekmConnections_codec);
+ if (NextPageToken.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken);
+ }
+ if (TotalSize != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalSize);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(ListEkmConnectionsResponse other) {
+ if (other == null) {
+ return;
+ }
+ ekmConnections_.Add(other.ekmConnections_);
+ if (other.NextPageToken.Length != 0) {
+ NextPageToken = other.NextPageToken;
+ }
+ if (other.TotalSize != 0) {
+ TotalSize = other.TotalSize;
+ }
+ _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: {
+ ekmConnections_.AddEntriesFrom(input, _repeated_ekmConnections_codec);
+ break;
+ }
+ case 18: {
+ NextPageToken = input.ReadString();
+ break;
+ }
+ case 24: {
+ TotalSize = 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: {
+ ekmConnections_.AddEntriesFrom(ref input, _repeated_ekmConnections_codec);
+ break;
+ }
+ case 18: {
+ NextPageToken = input.ReadString();
+ break;
+ }
+ case 24: {
+ TotalSize = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Request message for [KeyManagementService.GetEkmConnection][].
+ ///
+ public sealed partial class GetEkmConnectionRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetEkmConnectionRequest());
+ 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.Kms.V1.EkmServiceReflection.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 GetEkmConnectionRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public GetEkmConnectionRequest(GetEkmConnectionRequest other) : this() {
+ name_ = other.name_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public GetEkmConnectionRequest Clone() {
+ return new GetEkmConnectionRequest(this);
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ [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 GetEkmConnectionRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(GetEkmConnectionRequest 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(GetEkmConnectionRequest 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 [KeyManagementService.CreateEkmConnection][].
+ ///
+ public sealed partial class CreateEkmConnectionRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateEkmConnectionRequest());
+ 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.Kms.V1.EkmServiceReflection.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 CreateEkmConnectionRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CreateEkmConnectionRequest(CreateEkmConnectionRequest other) : this() {
+ parent_ = other.parent_;
+ ekmConnectionId_ = other.ekmConnectionId_;
+ ekmConnection_ = other.ekmConnection_ != null ? other.ekmConnection_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CreateEkmConnectionRequest Clone() {
+ return new CreateEkmConnectionRequest(this);
+ }
+
+ /// Field number for the "parent" field.
+ public const int ParentFieldNumber = 1;
+ private string parent_ = "";
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
+ /// `projects/*/locations/*`.
+ ///
+ [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 "ekm_connection_id" field.
+ public const int EkmConnectionIdFieldNumber = 2;
+ private string ekmConnectionId_ = "";
+ ///
+ /// Required. It must be unique within a location and match the regular
+ /// expression `[a-zA-Z0-9_-]{1,63}`.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string EkmConnectionId {
+ get { return ekmConnectionId_; }
+ set {
+ ekmConnectionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ekm_connection" field.
+ public const int EkmConnectionFieldNumber = 3;
+ private global::Google.Cloud.Kms.V1.EkmConnection ekmConnection_;
+ ///
+ /// Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with
+ /// initial field values.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Cloud.Kms.V1.EkmConnection EkmConnection {
+ get { return ekmConnection_; }
+ set {
+ ekmConnection_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as CreateEkmConnectionRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(CreateEkmConnectionRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Parent != other.Parent) return false;
+ if (EkmConnectionId != other.EkmConnectionId) return false;
+ if (!object.Equals(EkmConnection, other.EkmConnection)) 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 (EkmConnectionId.Length != 0) hash ^= EkmConnectionId.GetHashCode();
+ if (ekmConnection_ != null) hash ^= EkmConnection.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 (EkmConnectionId.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(EkmConnectionId);
+ }
+ if (ekmConnection_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(EkmConnection);
+ }
+ 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 (EkmConnectionId.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(EkmConnectionId);
+ }
+ if (ekmConnection_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(EkmConnection);
+ }
+ 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 (EkmConnectionId.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(EkmConnectionId);
+ }
+ if (ekmConnection_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(EkmConnection);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(CreateEkmConnectionRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Parent.Length != 0) {
+ Parent = other.Parent;
+ }
+ if (other.EkmConnectionId.Length != 0) {
+ EkmConnectionId = other.EkmConnectionId;
+ }
+ if (other.ekmConnection_ != null) {
+ if (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ EkmConnection.MergeFrom(other.EkmConnection);
+ }
+ _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: {
+ EkmConnectionId = input.ReadString();
+ break;
+ }
+ case 26: {
+ if (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ input.ReadMessage(EkmConnection);
+ 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: {
+ EkmConnectionId = input.ReadString();
+ break;
+ }
+ case 26: {
+ if (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ input.ReadMessage(EkmConnection);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Request message for [KeyManagementService.UpdateEkmConnection][].
+ ///
+ public sealed partial class UpdateEkmConnectionRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateEkmConnectionRequest());
+ 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.Kms.V1.EkmServiceReflection.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 UpdateEkmConnectionRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UpdateEkmConnectionRequest(UpdateEkmConnectionRequest other) : this() {
+ ekmConnection_ = other.ekmConnection_ != null ? other.ekmConnection_.Clone() : null;
+ updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UpdateEkmConnectionRequest Clone() {
+ return new UpdateEkmConnectionRequest(this);
+ }
+
+ /// Field number for the "ekm_connection" field.
+ public const int EkmConnectionFieldNumber = 1;
+ private global::Google.Cloud.Kms.V1.EkmConnection ekmConnection_;
+ ///
+ /// Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated
+ /// values.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Cloud.Kms.V1.EkmConnection EkmConnection {
+ get { return ekmConnection_; }
+ set {
+ ekmConnection_ = value;
+ }
+ }
+
+ /// Field number for the "update_mask" field.
+ public const int UpdateMaskFieldNumber = 2;
+ private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_;
+ ///
+ /// Required. List of fields to be updated in this request.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask {
+ get { return updateMask_; }
+ set {
+ updateMask_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as UpdateEkmConnectionRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(UpdateEkmConnectionRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(EkmConnection, other.EkmConnection)) return false;
+ if (!object.Equals(UpdateMask, other.UpdateMask)) 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 (ekmConnection_ != null) hash ^= EkmConnection.GetHashCode();
+ if (updateMask_ != null) hash ^= UpdateMask.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 (ekmConnection_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(EkmConnection);
+ }
+ if (updateMask_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(UpdateMask);
+ }
+ 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 (ekmConnection_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(EkmConnection);
+ }
+ if (updateMask_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(UpdateMask);
+ }
+ 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 (ekmConnection_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(EkmConnection);
+ }
+ if (updateMask_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(UpdateEkmConnectionRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ekmConnection_ != null) {
+ if (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ EkmConnection.MergeFrom(other.EkmConnection);
+ }
+ if (other.updateMask_ != null) {
+ if (updateMask_ == null) {
+ UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ UpdateMask.MergeFrom(other.UpdateMask);
+ }
+ _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 (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ input.ReadMessage(EkmConnection);
+ break;
+ }
+ case 18: {
+ if (updateMask_ == null) {
+ UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ input.ReadMessage(UpdateMask);
+ 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 (ekmConnection_ == null) {
+ EkmConnection = new global::Google.Cloud.Kms.V1.EkmConnection();
+ }
+ input.ReadMessage(EkmConnection);
+ break;
+ }
+ case 18: {
+ if (updateMask_ == null) {
+ UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ input.ReadMessage(UpdateMask);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// A [Certificate][google.cloud.kms.v1.Certificate] represents an X.509
+ /// certificate used to authenticate HTTPS connections to EKM replicas.
+ ///
+ public sealed partial class Certificate : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Certificate());
+ 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.Kms.V1.EkmServiceReflection.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 Certificate() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Certificate(Certificate other) : this() {
+ rawDer_ = other.rawDer_;
+ parsed_ = other.parsed_;
+ issuer_ = other.issuer_;
+ subject_ = other.subject_;
+ subjectAlternativeDnsNames_ = other.subjectAlternativeDnsNames_.Clone();
+ notBeforeTime_ = other.notBeforeTime_ != null ? other.notBeforeTime_.Clone() : null;
+ notAfterTime_ = other.notAfterTime_ != null ? other.notAfterTime_.Clone() : null;
+ serialNumber_ = other.serialNumber_;
+ sha256Fingerprint_ = other.sha256Fingerprint_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Certificate Clone() {
+ return new Certificate(this);
+ }
+
+ /// Field number for the "raw_der" field.
+ public const int RawDerFieldNumber = 1;
+ private pb::ByteString rawDer_ = pb::ByteString.Empty;
+ ///
+ /// Required. The raw certificate bytes in DER format.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pb::ByteString RawDer {
+ get { return rawDer_; }
+ set {
+ rawDer_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "parsed" field.
+ public const int ParsedFieldNumber = 2;
+ private bool parsed_;
+ ///
+ /// Output only. True if the certificate was parsed successfully.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Parsed {
+ get { return parsed_; }
+ set {
+ parsed_ = value;
+ }
+ }
+
+ /// Field number for the "issuer" field.
+ public const int IssuerFieldNumber = 3;
+ private string issuer_ = "";
+ ///
+ /// Output only. The issuer distinguished name in RFC 2253 format. Only present
+ /// if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Issuer {
+ get { return issuer_; }
+ set {
+ issuer_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "subject" field.
+ public const int SubjectFieldNumber = 4;
+ private string subject_ = "";
+ ///
+ /// Output only. The subject distinguished name in RFC 2253 format. Only
+ /// present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Subject {
+ get { return subject_; }
+ set {
+ subject_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "subject_alternative_dns_names" field.
+ public const int SubjectAlternativeDnsNamesFieldNumber = 5;
+ private static readonly pb::FieldCodec _repeated_subjectAlternativeDnsNames_codec
+ = pb::FieldCodec.ForString(42);
+ private readonly pbc::RepeatedField subjectAlternativeDnsNames_ = new pbc::RepeatedField();
+ ///
+ /// Output only. The subject Alternative DNS names. Only present if
+ /// [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField SubjectAlternativeDnsNames {
+ get { return subjectAlternativeDnsNames_; }
+ }
+
+ /// Field number for the "not_before_time" field.
+ public const int NotBeforeTimeFieldNumber = 6;
+ private global::Google.Protobuf.WellKnownTypes.Timestamp notBeforeTime_;
+ ///
+ /// Output only. The certificate is not valid before this time. Only present if
+ /// [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.WellKnownTypes.Timestamp NotBeforeTime {
+ get { return notBeforeTime_; }
+ set {
+ notBeforeTime_ = value;
+ }
+ }
+
+ /// Field number for the "not_after_time" field.
+ public const int NotAfterTimeFieldNumber = 7;
+ private global::Google.Protobuf.WellKnownTypes.Timestamp notAfterTime_;
+ ///
+ /// Output only. The certificate is not valid after this time. Only present if
+ /// [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.WellKnownTypes.Timestamp NotAfterTime {
+ get { return notAfterTime_; }
+ set {
+ notAfterTime_ = value;
+ }
+ }
+
+ /// Field number for the "serial_number" field.
+ public const int SerialNumberFieldNumber = 8;
+ private string serialNumber_ = "";
+ ///
+ /// Output only. The certificate serial number as a hex string. Only present if
+ /// [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string SerialNumber {
+ get { return serialNumber_; }
+ set {
+ serialNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "sha256_fingerprint" field.
+ public const int Sha256FingerprintFieldNumber = 9;
+ private string sha256Fingerprint_ = "";
+ ///
+ /// Output only. The SHA-256 certificate fingerprint as a hex string. Only
+ /// present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Sha256Fingerprint {
+ get { return sha256Fingerprint_; }
+ set {
+ sha256Fingerprint_ = 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 Certificate);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(Certificate other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (RawDer != other.RawDer) return false;
+ if (Parsed != other.Parsed) return false;
+ if (Issuer != other.Issuer) return false;
+ if (Subject != other.Subject) return false;
+ if(!subjectAlternativeDnsNames_.Equals(other.subjectAlternativeDnsNames_)) return false;
+ if (!object.Equals(NotBeforeTime, other.NotBeforeTime)) return false;
+ if (!object.Equals(NotAfterTime, other.NotAfterTime)) return false;
+ if (SerialNumber != other.SerialNumber) return false;
+ if (Sha256Fingerprint != other.Sha256Fingerprint) 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 (RawDer.Length != 0) hash ^= RawDer.GetHashCode();
+ if (Parsed != false) hash ^= Parsed.GetHashCode();
+ if (Issuer.Length != 0) hash ^= Issuer.GetHashCode();
+ if (Subject.Length != 0) hash ^= Subject.GetHashCode();
+ hash ^= subjectAlternativeDnsNames_.GetHashCode();
+ if (notBeforeTime_ != null) hash ^= NotBeforeTime.GetHashCode();
+ if (notAfterTime_ != null) hash ^= NotAfterTime.GetHashCode();
+ if (SerialNumber.Length != 0) hash ^= SerialNumber.GetHashCode();
+ if (Sha256Fingerprint.Length != 0) hash ^= Sha256Fingerprint.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 (RawDer.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(RawDer);
+ }
+ if (Parsed != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(Parsed);
+ }
+ if (Issuer.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Issuer);
+ }
+ if (Subject.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Subject);
+ }
+ subjectAlternativeDnsNames_.WriteTo(output, _repeated_subjectAlternativeDnsNames_codec);
+ if (notBeforeTime_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(NotBeforeTime);
+ }
+ if (notAfterTime_ != null) {
+ output.WriteRawTag(58);
+ output.WriteMessage(NotAfterTime);
+ }
+ if (SerialNumber.Length != 0) {
+ output.WriteRawTag(66);
+ output.WriteString(SerialNumber);
+ }
+ if (Sha256Fingerprint.Length != 0) {
+ output.WriteRawTag(74);
+ output.WriteString(Sha256Fingerprint);
+ }
+ 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 (RawDer.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(RawDer);
+ }
+ if (Parsed != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(Parsed);
+ }
+ if (Issuer.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Issuer);
+ }
+ if (Subject.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Subject);
+ }
+ subjectAlternativeDnsNames_.WriteTo(ref output, _repeated_subjectAlternativeDnsNames_codec);
+ if (notBeforeTime_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(NotBeforeTime);
+ }
+ if (notAfterTime_ != null) {
+ output.WriteRawTag(58);
+ output.WriteMessage(NotAfterTime);
+ }
+ if (SerialNumber.Length != 0) {
+ output.WriteRawTag(66);
+ output.WriteString(SerialNumber);
+ }
+ if (Sha256Fingerprint.Length != 0) {
+ output.WriteRawTag(74);
+ output.WriteString(Sha256Fingerprint);
+ }
+ 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 (RawDer.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(RawDer);
+ }
+ if (Parsed != false) {
+ size += 1 + 1;
+ }
+ if (Issuer.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Issuer);
+ }
+ if (Subject.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Subject);
+ }
+ size += subjectAlternativeDnsNames_.CalculateSize(_repeated_subjectAlternativeDnsNames_codec);
+ if (notBeforeTime_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(NotBeforeTime);
+ }
+ if (notAfterTime_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(NotAfterTime);
+ }
+ if (SerialNumber.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(SerialNumber);
+ }
+ if (Sha256Fingerprint.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Sha256Fingerprint);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(Certificate other) {
+ if (other == null) {
+ return;
+ }
+ if (other.RawDer.Length != 0) {
+ RawDer = other.RawDer;
+ }
+ if (other.Parsed != false) {
+ Parsed = other.Parsed;
+ }
+ if (other.Issuer.Length != 0) {
+ Issuer = other.Issuer;
+ }
+ if (other.Subject.Length != 0) {
+ Subject = other.Subject;
+ }
+ subjectAlternativeDnsNames_.Add(other.subjectAlternativeDnsNames_);
+ if (other.notBeforeTime_ != null) {
+ if (notBeforeTime_ == null) {
+ NotBeforeTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ NotBeforeTime.MergeFrom(other.NotBeforeTime);
+ }
+ if (other.notAfterTime_ != null) {
+ if (notAfterTime_ == null) {
+ NotAfterTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ NotAfterTime.MergeFrom(other.NotAfterTime);
+ }
+ if (other.SerialNumber.Length != 0) {
+ SerialNumber = other.SerialNumber;
+ }
+ if (other.Sha256Fingerprint.Length != 0) {
+ Sha256Fingerprint = other.Sha256Fingerprint;
+ }
+ _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: {
+ RawDer = input.ReadBytes();
+ break;
+ }
+ case 16: {
+ Parsed = input.ReadBool();
+ break;
+ }
+ case 26: {
+ Issuer = input.ReadString();
+ break;
+ }
+ case 34: {
+ Subject = input.ReadString();
+ break;
+ }
+ case 42: {
+ subjectAlternativeDnsNames_.AddEntriesFrom(input, _repeated_subjectAlternativeDnsNames_codec);
+ break;
+ }
+ case 50: {
+ if (notBeforeTime_ == null) {
+ NotBeforeTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(NotBeforeTime);
+ break;
+ }
+ case 58: {
+ if (notAfterTime_ == null) {
+ NotAfterTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(NotAfterTime);
+ break;
+ }
+ case 66: {
+ SerialNumber = input.ReadString();
+ break;
+ }
+ case 74: {
+ Sha256Fingerprint = 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: {
+ RawDer = input.ReadBytes();
+ break;
+ }
+ case 16: {
+ Parsed = input.ReadBool();
+ break;
+ }
+ case 26: {
+ Issuer = input.ReadString();
+ break;
+ }
+ case 34: {
+ Subject = input.ReadString();
+ break;
+ }
+ case 42: {
+ subjectAlternativeDnsNames_.AddEntriesFrom(ref input, _repeated_subjectAlternativeDnsNames_codec);
+ break;
+ }
+ case 50: {
+ if (notBeforeTime_ == null) {
+ NotBeforeTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(NotBeforeTime);
+ break;
+ }
+ case 58: {
+ if (notAfterTime_ == null) {
+ NotAfterTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(NotAfterTime);
+ break;
+ }
+ case 66: {
+ SerialNumber = input.ReadString();
+ break;
+ }
+ case 74: {
+ Sha256Fingerprint = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// An [EkmConnection][google.cloud.kms.v1.EkmConnection] represents an
+ /// individual EKM connection. It can be used for creating
+ /// [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
+ /// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] with a
+ /// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
+ /// [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], as well as
+ /// performing cryptographic operations using keys created within the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ public sealed partial class EkmConnection : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EkmConnection());
+ 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.Kms.V1.EkmServiceReflection.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 EkmConnection() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public EkmConnection(EkmConnection other) : this() {
+ name_ = other.name_;
+ createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null;
+ serviceResolvers_ = other.serviceResolvers_.Clone();
+ etag_ = other.etag_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public EkmConnection Clone() {
+ return new EkmConnection(this);
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ ///
+ /// Output only. The resource name for the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format
+ /// `projects/*/locations/*/ekmConnections/*`.
+ ///
+ [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. The time at which the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 "service_resolvers" field.
+ public const int ServiceResolversFieldNumber = 3;
+ private static readonly pb::FieldCodec _repeated_serviceResolvers_codec
+ = pb::FieldCodec.ForMessage(26, global::Google.Cloud.Kms.V1.EkmConnection.Types.ServiceResolver.Parser);
+ private readonly pbc::RepeatedField serviceResolvers_ = new pbc::RepeatedField();
+ ///
+ /// A list of
+ /// [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where
+ /// the EKM can be reached. There should be one ServiceResolver per EKM
+ /// replica. Currently, only a single
+ /// [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is
+ /// supported.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField ServiceResolvers {
+ get { return serviceResolvers_; }
+ }
+
+ /// Field number for the "etag" field.
+ public const int EtagFieldNumber = 5;
+ private string etag_ = "";
+ ///
+ /// This checksum is computed by the server based on the value of other fields,
+ /// and may be sent on update requests to ensure the client has an up-to-date
+ /// value before proceeding.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Etag {
+ get { return etag_; }
+ set {
+ etag_ = 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 EkmConnection);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(EkmConnection 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(!serviceResolvers_.Equals(other.serviceResolvers_)) return false;
+ if (Etag != other.Etag) 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();
+ hash ^= serviceResolvers_.GetHashCode();
+ if (Etag.Length != 0) hash ^= Etag.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);
+ }
+ serviceResolvers_.WriteTo(output, _repeated_serviceResolvers_codec);
+ if (Etag.Length != 0) {
+ output.WriteRawTag(42);
+ output.WriteString(Etag);
+ }
+ 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);
+ }
+ serviceResolvers_.WriteTo(ref output, _repeated_serviceResolvers_codec);
+ if (Etag.Length != 0) {
+ output.WriteRawTag(42);
+ output.WriteString(Etag);
+ }
+ 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);
+ }
+ size += serviceResolvers_.CalculateSize(_repeated_serviceResolvers_codec);
+ if (Etag.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Etag);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(EkmConnection 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);
+ }
+ serviceResolvers_.Add(other.serviceResolvers_);
+ if (other.Etag.Length != 0) {
+ Etag = other.Etag;
+ }
+ _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: {
+ serviceResolvers_.AddEntriesFrom(input, _repeated_serviceResolvers_codec);
+ break;
+ }
+ case 42: {
+ Etag = 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: {
+ if (createTime_ == null) {
+ CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(CreateTime);
+ break;
+ }
+ case 26: {
+ serviceResolvers_.AddEntriesFrom(ref input, _repeated_serviceResolvers_codec);
+ break;
+ }
+ case 42: {
+ Etag = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ #region Nested types
+ /// Container for nested types declared in the EkmConnection message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static partial class Types {
+ ///
+ /// A [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver]
+ /// represents an EKM replica that can be reached within an
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ public sealed partial class ServiceResolver : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceResolver());
+ 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.Kms.V1.EkmConnection.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 ServiceResolver() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ServiceResolver(ServiceResolver other) : this() {
+ serviceDirectoryService_ = other.serviceDirectoryService_;
+ endpointFilter_ = other.endpointFilter_;
+ hostname_ = other.hostname_;
+ serverCertificates_ = other.serverCertificates_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ServiceResolver Clone() {
+ return new ServiceResolver(this);
+ }
+
+ /// Field number for the "service_directory_service" field.
+ public const int ServiceDirectoryServiceFieldNumber = 1;
+ private string serviceDirectoryService_ = "";
+ ///
+ /// Required. The resource name of the Service Directory service pointing to
+ /// an EKM replica, in the format
+ /// `projects/*/locations/*/namespaces/*/services/*`.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string ServiceDirectoryService {
+ get { return serviceDirectoryService_; }
+ set {
+ serviceDirectoryService_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "endpoint_filter" field.
+ public const int EndpointFilterFieldNumber = 2;
+ private string endpointFilter_ = "";
+ ///
+ /// Optional. The filter applied to the endpoints of the resolved service. If
+ /// no filter is specified, all endpoints will be considered. An endpoint
+ /// will be chosen arbitrarily from the filtered list for each request.
+ ///
+ /// For endpoint filter syntax and examples, see
+ /// https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string EndpointFilter {
+ get { return endpointFilter_; }
+ set {
+ endpointFilter_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "hostname" field.
+ public const int HostnameFieldNumber = 3;
+ private string hostname_ = "";
+ ///
+ /// Required. The hostname of the EKM replica used at TLS and HTTP layers.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Hostname {
+ get { return hostname_; }
+ set {
+ hostname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "server_certificates" field.
+ public const int ServerCertificatesFieldNumber = 4;
+ private static readonly pb::FieldCodec _repeated_serverCertificates_codec
+ = pb::FieldCodec.ForMessage(34, global::Google.Cloud.Kms.V1.Certificate.Parser);
+ private readonly pbc::RepeatedField serverCertificates_ = new pbc::RepeatedField();
+ ///
+ /// Required. A list of leaf server certificates used to authenticate HTTPS
+ /// connections to the EKM replica.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField ServerCertificates {
+ get { return serverCertificates_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as ServiceResolver);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(ServiceResolver other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ServiceDirectoryService != other.ServiceDirectoryService) return false;
+ if (EndpointFilter != other.EndpointFilter) return false;
+ if (Hostname != other.Hostname) return false;
+ if(!serverCertificates_.Equals(other.serverCertificates_)) 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 (ServiceDirectoryService.Length != 0) hash ^= ServiceDirectoryService.GetHashCode();
+ if (EndpointFilter.Length != 0) hash ^= EndpointFilter.GetHashCode();
+ if (Hostname.Length != 0) hash ^= Hostname.GetHashCode();
+ hash ^= serverCertificates_.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 (ServiceDirectoryService.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ServiceDirectoryService);
+ }
+ if (EndpointFilter.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(EndpointFilter);
+ }
+ if (Hostname.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Hostname);
+ }
+ serverCertificates_.WriteTo(output, _repeated_serverCertificates_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (ServiceDirectoryService.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ServiceDirectoryService);
+ }
+ if (EndpointFilter.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(EndpointFilter);
+ }
+ if (Hostname.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Hostname);
+ }
+ serverCertificates_.WriteTo(ref output, _repeated_serverCertificates_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (ServiceDirectoryService.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceDirectoryService);
+ }
+ if (EndpointFilter.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(EndpointFilter);
+ }
+ if (Hostname.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Hostname);
+ }
+ size += serverCertificates_.CalculateSize(_repeated_serverCertificates_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(ServiceResolver other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ServiceDirectoryService.Length != 0) {
+ ServiceDirectoryService = other.ServiceDirectoryService;
+ }
+ if (other.EndpointFilter.Length != 0) {
+ EndpointFilter = other.EndpointFilter;
+ }
+ if (other.Hostname.Length != 0) {
+ Hostname = other.Hostname;
+ }
+ serverCertificates_.Add(other.serverCertificates_);
+ _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: {
+ ServiceDirectoryService = input.ReadString();
+ break;
+ }
+ case 18: {
+ EndpointFilter = input.ReadString();
+ break;
+ }
+ case 26: {
+ Hostname = input.ReadString();
+ break;
+ }
+ case 34: {
+ serverCertificates_.AddEntriesFrom(input, _repeated_serverCertificates_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: {
+ ServiceDirectoryService = input.ReadString();
+ break;
+ }
+ case 18: {
+ EndpointFilter = input.ReadString();
+ break;
+ }
+ case 26: {
+ Hostname = input.ReadString();
+ break;
+ }
+ case 34: {
+ serverCertificates_.AddEntriesFrom(ref input, _repeated_serverCertificates_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmServiceClient.g.cs b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmServiceClient.g.cs
new file mode 100644
index 000000000000..f376656e28aa
--- /dev/null
+++ b/apis/Google.Cloud.Kms.V1/Google.Cloud.Kms.V1/EkmServiceClient.g.cs
@@ -0,0 +1,991 @@
+// Copyright 2022 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!
+
+using gax = Google.Api.Gax;
+using gaxgrpc = Google.Api.Gax.Grpc;
+using gaxgrpccore = Google.Api.Gax.Grpc.GrpcCore;
+using gagr = Google.Api.Gax.ResourceNames;
+using proto = Google.Protobuf;
+using wkt = Google.Protobuf.WellKnownTypes;
+using grpccore = Grpc.Core;
+using grpcinter = Grpc.Core.Interceptors;
+using sys = System;
+using sc = System.Collections;
+using scg = System.Collections.Generic;
+using sco = System.Collections.ObjectModel;
+using st = System.Threading;
+using stt = System.Threading.Tasks;
+
+namespace Google.Cloud.Kms.V1
+{
+ /// Settings for instances.
+ public sealed partial class EkmServiceSettings : gaxgrpc::ServiceSettingsBase
+ {
+ /// Get a new instance of the default .
+ /// A new instance of the default .
+ public static EkmServiceSettings GetDefault() => new EkmServiceSettings();
+
+ /// Constructs a new object with default settings.
+ public EkmServiceSettings()
+ {
+ }
+
+ private EkmServiceSettings(EkmServiceSettings existing) : base(existing)
+ {
+ gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
+ ListEkmConnectionsSettings = existing.ListEkmConnectionsSettings;
+ GetEkmConnectionSettings = existing.GetEkmConnectionSettings;
+ CreateEkmConnectionSettings = existing.CreateEkmConnectionSettings;
+ UpdateEkmConnectionSettings = existing.UpdateEkmConnectionSettings;
+ OnCopy(existing);
+ }
+
+ partial void OnCopy(EkmServiceSettings existing);
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// EkmServiceClient.ListEkmConnections and EkmServiceClient.ListEkmConnectionsAsync.
+ ///
+ ///
+ ///
+ /// - Initial retry delay: 100 milliseconds.
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds.
+ /// - Maximum attempts: 5
+ /// -
+ ///
+ /// Retriable status codes: ,
+ /// .
+ ///
+ ///
+ /// - Timeout: 60 seconds.
+ ///
+ ///
+ public gaxgrpc::CallSettings ListEkmConnectionsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded)));
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// EkmServiceClient.GetEkmConnection and EkmServiceClient.GetEkmConnectionAsync.
+ ///
+ ///
+ ///
+ /// - Initial retry delay: 100 milliseconds.
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds.
+ /// - Maximum attempts: 5
+ /// -
+ ///
+ /// Retriable status codes: ,
+ /// .
+ ///
+ ///
+ /// - Timeout: 60 seconds.
+ ///
+ ///
+ public gaxgrpc::CallSettings GetEkmConnectionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded)));
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// EkmServiceClient.CreateEkmConnection and EkmServiceClient.CreateEkmConnectionAsync.
+ ///
+ ///
+ ///
+ /// - Initial retry delay: 100 milliseconds.
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds.
+ /// - Maximum attempts: 5
+ /// -
+ ///
+ /// Retriable status codes: ,
+ /// .
+ ///
+ ///
+ /// - Timeout: 60 seconds.
+ ///
+ ///
+ public gaxgrpc::CallSettings CreateEkmConnectionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded)));
+
+ ///
+ /// for synchronous and asynchronous calls to
+ /// EkmServiceClient.UpdateEkmConnection and EkmServiceClient.UpdateEkmConnectionAsync.
+ ///
+ ///
+ ///
+ /// - Initial retry delay: 100 milliseconds.
+ /// - Retry delay multiplier: 1.3
+ /// - Retry maximum delay: 60000 milliseconds.
+ /// - Maximum attempts: 5
+ /// -
+ ///
+ /// Retriable status codes: ,
+ /// .
+ ///
+ ///
+ /// - Timeout: 60 seconds.
+ ///
+ ///
+ public gaxgrpc::CallSettings UpdateEkmConnectionSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded)));
+
+ /// Creates a deep clone of this object, with all the same property values.
+ /// A deep clone of this object.
+ public EkmServiceSettings Clone() => new EkmServiceSettings(this);
+ }
+
+ ///
+ /// Builder class for to provide simple configuration of credentials, endpoint etc.
+ ///
+ public sealed partial class EkmServiceClientBuilder : gaxgrpc::ClientBuilderBase
+ {
+ /// The settings to use for RPCs, or null for the default settings.
+ public EkmServiceSettings Settings { get; set; }
+
+ /// Creates a new builder with default settings.
+ public EkmServiceClientBuilder()
+ {
+ UseJwtAccessWithScopes = EkmServiceClient.UseJwtAccessWithScopes;
+ }
+
+ partial void InterceptBuild(ref EkmServiceClient client);
+
+ partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task);
+
+ /// Builds the resulting client.
+ public override EkmServiceClient Build()
+ {
+ EkmServiceClient 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 EkmServiceClient BuildImpl()
+ {
+ Validate();
+ grpccore::CallInvoker callInvoker = CreateCallInvoker();
+ return EkmServiceClient.Create(callInvoker, Settings);
+ }
+
+ private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken)
+ {
+ Validate();
+ grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false);
+ return EkmServiceClient.Create(callInvoker, Settings);
+ }
+
+ /// Returns the endpoint for this builder type, used if no endpoint is otherwise specified.
+ protected override string GetDefaultEndpoint() => EkmServiceClient.DefaultEndpoint;
+
+ ///
+ /// Returns the default scopes for this builder type, used if no scopes are otherwise specified.
+ ///
+ protected override scg::IReadOnlyList GetDefaultScopes() => EkmServiceClient.DefaultScopes;
+
+ /// Returns the channel pool to use when no other options are specified.
+ protected override gaxgrpc::ChannelPool GetChannelPool() => EkmServiceClient.ChannelPool;
+
+ /// Returns the default to use if not otherwise specified.
+ protected override gaxgrpc::GrpcAdapter DefaultGrpcAdapter => gaxgrpccore::GrpcCoreAdapter.Instance;
+ }
+
+ /// EkmService client wrapper, for convenient use.
+ ///
+ /// Google Cloud Key Management EKM Service
+ ///
+ /// Manages external cryptographic keys and operations using those keys.
+ /// Implements a REST model with the following objects:
+ /// * [EkmConnection][google.cloud.kms.v1.EkmConnection]
+ ///
+ public abstract partial class EkmServiceClient
+ {
+ ///
+ /// The default endpoint for the EkmService service, which is a host of "cloudkms.googleapis.com" and a port of
+ /// 443.
+ ///
+ public static string DefaultEndpoint { get; } = "cloudkms.googleapis.com:443";
+
+ /// The default EkmService scopes.
+ ///
+ /// The default EkmService scopes are:
+ ///
+ /// - https://www.googleapis.com/auth/cloud-platform
+ /// - https://www.googleapis.com/auth/cloudkms
+ ///
+ ///
+ public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[]
+ {
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloudkms",
+ });
+
+ internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(DefaultScopes, UseJwtAccessWithScopes);
+
+ internal static bool UseJwtAccessWithScopes
+ {
+ get
+ {
+ bool useJwtAccessWithScopes = true;
+ MaybeUseJwtAccessWithScopes(ref useJwtAccessWithScopes);
+ return useJwtAccessWithScopes;
+ }
+ }
+
+ static partial void MaybeUseJwtAccessWithScopes(ref bool useJwtAccessWithScopes);
+
+ ///
+ /// 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 EkmServiceClientBuilder().BuildAsync(cancellationToken);
+
+ ///
+ /// Synchronously creates a using the default credentials, endpoint and settings.
+ /// To specify custom credentials or other settings, use .
+ ///
+ /// The created .
+ public static EkmServiceClient Create() => new EkmServiceClientBuilder().Build();
+
+ ///
+ /// Creates a which uses the specified call invoker for remote operations.
+ ///
+ ///
+ /// The for remote operations. Must not be null.
+ ///
+ /// Optional .
+ /// The created .
+ internal static EkmServiceClient Create(grpccore::CallInvoker callInvoker, EkmServiceSettings settings = null)
+ {
+ gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
+ grpcinter::Interceptor interceptor = settings?.Interceptor;
+ if (interceptor != null)
+ {
+ callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
+ }
+ EkmService.EkmServiceClient grpcClient = new EkmService.EkmServiceClient(callInvoker);
+ return new EkmServiceClientImpl(grpcClient, settings);
+ }
+
+ ///
+ /// 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 EkmService client
+ public virtual EkmService.EkmServiceClient GrpcClient => throw new sys::NotImplementedException();
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ /// 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 ListEkmConnections(ListEkmConnectionsRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ /// 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 ListEkmConnectionsAsync(ListEkmConnectionsRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// 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 ListEkmConnections(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListEkmConnections(new ListEkmConnectionsRequest
+ {
+ Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// 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 ListEkmConnectionsAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListEkmConnectionsAsync(new ListEkmConnectionsRequest
+ {
+ Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// 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 ListEkmConnections(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListEkmConnections(new ListEkmConnectionsRequest
+ {
+ ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// 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 ListEkmConnectionsAsync(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
+ ListEkmConnectionsAsync(new ListEkmConnectionsRequest
+ {
+ ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)),
+ PageToken = pageToken ?? "",
+ PageSize = pageSize ?? 0,
+ }, callSettings);
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ /// 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 EkmConnection GetEkmConnection(GetEkmConnectionRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ /// 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 GetEkmConnectionAsync(GetEkmConnectionRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ /// 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 GetEkmConnectionAsync(GetEkmConnectionRequest request, st::CancellationToken cancellationToken) =>
+ GetEkmConnectionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// The RPC response.
+ public virtual EkmConnection GetEkmConnection(string name, gaxgrpc::CallSettings callSettings = null) =>
+ GetEkmConnection(new GetEkmConnectionRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ }, callSettings);
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// A Task containing the RPC response.
+ public virtual stt::Task GetEkmConnectionAsync(string name, gaxgrpc::CallSettings callSettings = null) =>
+ GetEkmConnectionAsync(new GetEkmConnectionRequest
+ {
+ Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
+ }, callSettings);
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// A to use for this RPC.
+ /// A Task containing the RPC response.
+ public virtual stt::Task GetEkmConnectionAsync(string name, st::CancellationToken cancellationToken) =>
+ GetEkmConnectionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// The RPC response.
+ public virtual EkmConnection GetEkmConnection(EkmConnectionName name, gaxgrpc::CallSettings callSettings = null) =>
+ GetEkmConnection(new GetEkmConnectionRequest
+ {
+ EkmConnectionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ }, callSettings);
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// A Task containing the RPC response.
+ public virtual stt::Task GetEkmConnectionAsync(EkmConnectionName name, gaxgrpc::CallSettings callSettings = null) =>
+ GetEkmConnectionAsync(new GetEkmConnectionRequest
+ {
+ EkmConnectionName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)),
+ }, callSettings);
+
+ ///
+ /// Returns metadata for a given
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ ///
+ ///
+ /// Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ ///
+ /// A to use for this RPC.
+ /// A Task containing the RPC response.
+ public virtual stt::Task GetEkmConnectionAsync(EkmConnectionName name, st::CancellationToken cancellationToken) =>
+ GetEkmConnectionAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 EkmConnection CreateEkmConnection(CreateEkmConnectionRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 CreateEkmConnectionAsync(CreateEkmConnectionRequest request, gaxgrpc::CallSettings callSettings = null) =>
+ throw new sys::NotImplementedException();
+
+ ///
+ /// Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 CreateEkmConnectionAsync(CreateEkmConnectionRequest request, st::CancellationToken cancellationToken) =>
+ CreateEkmConnectionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
+
+ ///
+ /// Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given
+ /// Project and Location.
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// Required. It must be unique within a location and match the regular
+ /// expression `[a-zA-Z0-9_-]{1,63}`.
+ ///
+ ///
+ /// Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with
+ /// initial field values.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// The RPC response.
+ public virtual EkmConnection CreateEkmConnection(string parent, string ekmConnectionId, EkmConnection ekmConnection, gaxgrpc::CallSettings callSettings = null) =>
+ CreateEkmConnection(new CreateEkmConnectionRequest
+ {
+ Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)),
+ EkmConnectionId = gax::GaxPreconditions.CheckNotNullOrEmpty(ekmConnectionId, nameof(ekmConnectionId)),
+ EkmConnection = gax::GaxPreconditions.CheckNotNull(ekmConnection, nameof(ekmConnection)),
+ }, callSettings);
+
+ ///
+ /// Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given
+ /// Project and Location.
+ ///
+ ///
+ /// Required. The resource name of the location associated with the
+ /// [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
+ /// `projects/*/locations/*`.
+ ///
+ ///
+ /// Required. It must be unique within a location and match the regular
+ /// expression `[a-zA-Z0-9_-]{1,63}`.
+ ///
+ ///
+ /// Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with
+ /// initial field values.
+ ///
+ /// If not null, applies overrides to this RPC call.
+ /// A Task containing the RPC response.
+ public virtual stt::Task CreateEkmConnectionAsync(string parent, string ekmConnectionId, EkmConnection ekmConnection, gaxgrpc::CallSettings callSettings = null) =>
+ CreateEkmConnectionAsync(new CreateEkmConnectionRequest
+ {
+ Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)),
+ EkmConnectionId = gax::GaxPreconditions.CheckNotNullOrEmpty(ekmConnectionId, nameof(ekmConnectionId)),
+ EkmConnection = gax::GaxPreconditions.CheckNotNull(ekmConnection, nameof(ekmConnection)),
+ }, callSettings);
+
+ ///