-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to C# GAPIC generator v1.4.33
PiperOrigin-RevId: 723710845 Source-Link: googleapis/googleapis@fed8c26 Source-Link: googleapis/googleapis-gen@a306f3a Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjcmV0TWFuYWdlci5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYTMwNmYzYTgwM2MxNzk1NjNhYzE2N2MzNGZiMGViNWM5ZjcwOTY5NiJ9 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjcmV0TWFuYWdlci5WMUJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJhMzA2ZjNhODAzYzE3OTU2M2FjMTY3YzM0ZmIwZWI1YzlmNzA5Njk2In0= Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjcmV0TWFuYWdlci5WMUJldGEyLy5Pd2xCb3QueWFtbCIsImgiOiJhMzA2ZjNhODAzYzE3OTU2M2FjMTY3YzM0ZmIwZWI1YzlmNzA5Njk2In0= Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJlU291cmNlTWFuYWdlci5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYTMwNmYzYTgwM2MxNzk1NjNhYzE2N2MzNGZiMGViNWM5ZjcwOTY5NiJ9 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHkuUHJpdmF0ZUNBLlYxLy5Pd2xCb3QueWFtbCIsImgiOiJhMzA2ZjNhODAzYzE3OTU2M2FjMTY3YzM0ZmIwZWI1YzlmNzA5Njk2In0= Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHkuUHVibGljQ0EuVjEvLk93bEJvdC55YW1sIiwiaCI6ImEzMDZmM2E4MDNjMTc5NTYzYWMxNjdjMzRmYjBl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wiLCJoIjoiYTMwNmYzYTgwM2MxNzk1NjNhYzE2N2MzNGZiMGViNWM5ZjcwOTY5NiJ9
- Loading branch information
1 parent
25625fc
commit 835903a
Showing
2,433 changed files
with
701,863 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...SecretManager.V1.GeneratedSnippets/Google.Cloud.SecretManager.V1.GeneratedSnippets.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net6.0;net462</TargetFrameworks> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../Google.Cloud.SecretManager.V1/Google.Cloud.SecretManager.V1.csproj" /> | ||
<PackageReference Include="System.Linq.Async" Version="6.0.1" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
</Project> |
44 changes: 44 additions & 0 deletions
44
...ager.V1.GeneratedSnippets/SecretManagerServiceClient.AccessSecretVersionAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async_flattened] | ||
using Google.Cloud.SecretManager.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersionAsync</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 AccessSecretVersionAsync() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]"; | ||
// Make the request | ||
AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async_flattened] | ||
} |
47 changes: 47 additions & 0 deletions
47
...atedSnippets/SecretManagerServiceClient.AccessSecretVersionRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async] | ||
using Google.Cloud.SecretManager.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersionAsync</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 AccessSecretVersionRequestObjectAsync() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
AccessSecretVersionRequest request = new AccessSecretVersionRequest | ||
{ | ||
SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"), | ||
}; | ||
// Make the request | ||
AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(request); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async] | ||
} |
46 changes: 46 additions & 0 deletions
46
...GeneratedSnippets/SecretManagerServiceClient.AccessSecretVersionRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] | ||
using Google.Cloud.SecretManager.V1; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersion</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 AccessSecretVersionRequestObject() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create(); | ||
// Initialize request argument(s) | ||
AccessSecretVersionRequest request = new AccessSecretVersionRequest | ||
{ | ||
SecretVersionName = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"), | ||
}; | ||
// Make the request | ||
AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(request); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] | ||
} |
44 changes: 44 additions & 0 deletions
44
...atedSnippets/SecretManagerServiceClient.AccessSecretVersionResourceNamesAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async_flattened_resourceNames] | ||
using Google.Cloud.SecretManager.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersionAsync</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 AccessSecretVersionResourceNamesAsync() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"); | ||
// Make the request | ||
AccessSecretVersionResponse response = await secretManagerServiceClient.AccessSecretVersionAsync(name); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_async_flattened_resourceNames] | ||
} |
43 changes: 43 additions & 0 deletions
43
...GeneratedSnippets/SecretManagerServiceClient.AccessSecretVersionResourceNamesSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync_flattened_resourceNames] | ||
using Google.Cloud.SecretManager.V1; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersion</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 AccessSecretVersionResourceNames() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create(); | ||
// Initialize request argument(s) | ||
SecretVersionName name = SecretVersionName.FromProjectSecretSecretVersion("[PROJECT]", "[SECRET]", "[SECRET_VERSION]"); | ||
// Make the request | ||
AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(name); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync_flattened_resourceNames] | ||
} |
43 changes: 43 additions & 0 deletions
43
...etManager.V1.GeneratedSnippets/SecretManagerServiceClient.AccessSecretVersionSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync_flattened] | ||
using Google.Cloud.SecretManager.V1; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AccessSecretVersion</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 AccessSecretVersion() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = SecretManagerServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/secrets/[SECRET]/versions/[SECRET_VERSION]"; | ||
// Make the request | ||
AccessSecretVersionResponse response = secretManagerServiceClient.AccessSecretVersion(name); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync_flattened] | ||
} |
45 changes: 45 additions & 0 deletions
45
...Manager.V1.GeneratedSnippets/SecretManagerServiceClient.AddSecretVersionAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async_flattened] | ||
using Google.Cloud.SecretManager.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AddSecretVersionAsync</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 AddSecretVersionAsync() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/secrets/[SECRET]"; | ||
SecretPayload payload = new SecretPayload(); | ||
// Make the request | ||
SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(parent, payload); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
...neratedSnippets/SecretManagerServiceClient.AddSecretVersionRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async] | ||
using Google.Cloud.SecretManager.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecretManagerServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AddSecretVersionAsync</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 AddSecretVersionRequestObjectAsync() | ||
{ | ||
// Create client | ||
SecretManagerServiceClient secretManagerServiceClient = await SecretManagerServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
AddSecretVersionRequest request = new AddSecretVersionRequest | ||
{ | ||
ParentAsSecretName = SecretName.FromProjectSecret("[PROJECT]", "[SECRET]"), | ||
Payload = new SecretPayload(), | ||
}; | ||
// Make the request | ||
SecretVersion response = await secretManagerServiceClient.AddSecretVersionAsync(request); | ||
} | ||
} | ||
// [END secretmanager_v1_generated_SecretManagerService_AddSecretVersion_async] | ||
} |
Oops, something went wrong.