Skip to content

Commit

Permalink
feat: add support for Coordinated External Keys
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 514450927

Source-Link: googleapis/googleapis@de50ec6

Source-Link: googleapis/googleapis-gen@8a0f354
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuS21zLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI4YTBmMzU0ZDQ3NzNlMzY5MDI4YzgxMDlhMDUzM2ZjMzAzODY4NDRiIn0=
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Mar 6, 2023
1 parent cbb4dd8 commit 08d67d7
Show file tree
Hide file tree
Showing 18 changed files with 2,829 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_async_flattened]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfigAsync</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 GetEkmConfigAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConfig";
// Make the request
EkmConfig response = await ekmServiceClient.GetEkmConfigAsync(name);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_async]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfigAsync</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 GetEkmConfigRequestObjectAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
GetEkmConfigRequest request = new GetEkmConfigRequest
{
EkmConfigName = EkmConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
EkmConfig response = await ekmServiceClient.GetEkmConfigAsync(request);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_async]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_sync]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfig</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 GetEkmConfigRequestObject()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
GetEkmConfigRequest request = new GetEkmConfigRequest
{
EkmConfigName = EkmConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
EkmConfig response = ekmServiceClient.GetEkmConfig(request);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_sync]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_async_flattened_resourceNames]
using Google.Cloud.Kms.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfigAsync</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 GetEkmConfigResourceNamesAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConfigName name = EkmConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
EkmConfig response = await ekmServiceClient.GetEkmConfigAsync(name);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_sync_flattened_resourceNames]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfig</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 GetEkmConfigResourceNames()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
EkmConfigName name = EkmConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
EkmConfig response = ekmServiceClient.GetEkmConfig(name);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_GetEkmConfig_sync_flattened]
using Google.Cloud.Kms.V1;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for GetEkmConfig</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 GetEkmConfig()
{
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConfig";
// Make the request
EkmConfig response = ekmServiceClient.GetEkmConfig(name);
}
}
// [END cloudkms_v1_generated_EkmService_GetEkmConfig_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_UpdateEkmConfig_async_flattened]
using Google.Cloud.Kms.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for UpdateEkmConfigAsync</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 UpdateEkmConfigAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConfig ekmConfig = new EkmConfig();
FieldMask updateMask = new FieldMask();
// Make the request
EkmConfig response = await ekmServiceClient.UpdateEkmConfigAsync(ekmConfig, updateMask);
}
}
// [END cloudkms_v1_generated_EkmService_UpdateEkmConfig_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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 Google.Cloud.Kms.V1.Snippets
{
// [START cloudkms_v1_generated_EkmService_UpdateEkmConfig_async]
using Google.Cloud.Kms.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedEkmServiceClientSnippets
{
/// <summary>Snippet for UpdateEkmConfigAsync</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 UpdateEkmConfigRequestObjectAsync()
{
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateEkmConfigRequest request = new UpdateEkmConfigRequest
{
EkmConfig = new EkmConfig(),
UpdateMask = new FieldMask(),
};
// Make the request
EkmConfig response = await ekmServiceClient.UpdateEkmConfigAsync(request);
}
}
// [END cloudkms_v1_generated_EkmService_UpdateEkmConfig_async]
}
Loading

0 comments on commit 08d67d7

Please sign in to comment.