Skip to content

Commit

Permalink
feat: added VerifyConnectivity RPC
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 530991686

Source-Link: googleapis/googleapis@be2600e

Source-Link: googleapis/googleapis-gen@7eadc0e
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuS21zLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI3ZWFkYzBlMGFhZWNlMmJjY2I0ZTU2MWYzYjI5YjA1ODRmYmNmOTA2In0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed May 12, 2023
1 parent 87c14ef commit 6a49888
Show file tree
Hide file tree
Showing 13 changed files with 1,354 additions and 38 deletions.
@@ -0,0 +1,44 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_async_flattened]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivityAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task VerifyConnectivityAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
// Make the request
VerifyConnectivityResponse response = await ekmServiceClient.VerifyConnectivityAsync(name);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_async_flattened]
}
@@ -0,0 +1,47 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_async]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivityAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task VerifyConnectivityRequestObjectAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
VerifyConnectivityRequest request = new VerifyConnectivityRequest
{
EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
};
// Make the request
VerifyConnectivityResponse response = await ekmServiceClient.VerifyConnectivityAsync(request);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_async]
}
@@ -0,0 +1,46 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_sync]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivity</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void VerifyConnectivityRequestObject()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
VerifyConnectivityRequest request = new VerifyConnectivityRequest
{
EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
};
// Make the request
VerifyConnectivityResponse response = ekmServiceClient.VerifyConnectivity(request);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_sync]
}
@@ -0,0 +1,44 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_async_flattened_resourceNames]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivityAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task VerifyConnectivityResourceNamesAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
// Make the request
VerifyConnectivityResponse response = await ekmServiceClient.VerifyConnectivityAsync(name);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_async_flattened_resourceNames]
}
@@ -0,0 +1,43 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_sync_flattened_resourceNames]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivity</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void VerifyConnectivityResourceNames()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
// Make the request
VerifyConnectivityResponse response = ekmServiceClient.VerifyConnectivity(name);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_sync_flattened_resourceNames]
}
@@ -0,0 +1,43 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START cloudkms_v1_generated_EkmService_VerifyConnectivity_sync_flattened]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for VerifyConnectivity</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void VerifyConnectivity()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
// Make the request
VerifyConnectivityResponse response = ekmServiceClient.VerifyConnectivity(name);
}
}
// [END cloudkms_v1_generated_EkmService_VerifyConnectivity_sync_flattened]
}

0 comments on commit 6a49888

Please sign in to comment.