Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiperOrigin-RevId: 504700327 Source-Link: googleapis/googleapis@91b494f Source-Link: googleapis/googleapis-gen@9af0d4f Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTmV0d29ya0Nvbm5lY3Rpdml0eS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiOWFmMGQ0ZmU3OWI2MGM5ZmNiODUzOTQ5N2QxOGExNGY1OTE3ZDk1MiJ9
- Loading branch information
1 parent
e4901eb
commit 49cf881
Showing
39 changed files
with
9,622 additions
and
812 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
...GeneratedSnippets/PolicyBasedRoutingServiceClient.CreatePolicyBasedRouteAsyncSnippet.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,63 @@ | ||
// 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.NetworkConnectivity.V1.Snippets | ||
{ | ||
// [START networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async_flattened] | ||
using Google.Cloud.NetworkConnectivity.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedPolicyBasedRoutingServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreatePolicyBasedRouteAsync</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 CreatePolicyBasedRouteAsync() | ||
{ | ||
// Create client | ||
PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = await PolicyBasedRoutingServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]"; | ||
PolicyBasedRoute policyBasedRoute = new PolicyBasedRoute(); | ||
string policyBasedRouteId = ""; | ||
// Make the request | ||
Operation<PolicyBasedRoute, OperationMetadata> response = await policyBasedRoutingServiceClient.CreatePolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PolicyBasedRoute, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
PolicyBasedRoute result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<PolicyBasedRoute, OperationMetadata> retrievedResponse = await policyBasedRoutingServiceClient.PollOnceCreatePolicyBasedRouteAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PolicyBasedRoute retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async_flattened] | ||
} |
68 changes: 68 additions & 0 deletions
68
...pets/PolicyBasedRoutingServiceClient.CreatePolicyBasedRouteRequestObjectAsyncSnippet.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,68 @@ | ||
// 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.NetworkConnectivity.V1.Snippets | ||
{ | ||
// [START networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.NetworkConnectivity.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedPolicyBasedRoutingServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreatePolicyBasedRouteAsync</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 CreatePolicyBasedRouteRequestObjectAsync() | ||
{ | ||
// Create client | ||
PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = await PolicyBasedRoutingServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreatePolicyBasedRouteRequest request = new CreatePolicyBasedRouteRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
PolicyBasedRouteId = "", | ||
PolicyBasedRoute = new PolicyBasedRoute(), | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<PolicyBasedRoute, OperationMetadata> response = await policyBasedRoutingServiceClient.CreatePolicyBasedRouteAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PolicyBasedRoute, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
PolicyBasedRoute result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<PolicyBasedRoute, OperationMetadata> retrievedResponse = await policyBasedRoutingServiceClient.PollOnceCreatePolicyBasedRouteAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PolicyBasedRoute retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async] | ||
} |
67 changes: 67 additions & 0 deletions
67
...dSnippets/PolicyBasedRoutingServiceClient.CreatePolicyBasedRouteRequestObjectSnippet.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,67 @@ | ||
// 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.NetworkConnectivity.V1.Snippets | ||
{ | ||
// [START networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.NetworkConnectivity.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedPolicyBasedRoutingServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreatePolicyBasedRoute</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 CreatePolicyBasedRouteRequestObject() | ||
{ | ||
// Create client | ||
PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = PolicyBasedRoutingServiceClient.Create(); | ||
// Initialize request argument(s) | ||
CreatePolicyBasedRouteRequest request = new CreatePolicyBasedRouteRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
PolicyBasedRouteId = "", | ||
PolicyBasedRoute = new PolicyBasedRoute(), | ||
RequestId = "", | ||
}; | ||
// Make the request | ||
Operation<PolicyBasedRoute, OperationMetadata> response = policyBasedRoutingServiceClient.CreatePolicyBasedRoute(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PolicyBasedRoute, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
PolicyBasedRoute result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<PolicyBasedRoute, OperationMetadata> retrievedResponse = policyBasedRoutingServiceClient.PollOnceCreatePolicyBasedRoute(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PolicyBasedRoute retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] | ||
} |
64 changes: 64 additions & 0 deletions
64
...pets/PolicyBasedRoutingServiceClient.CreatePolicyBasedRouteResourceNamesAsyncSnippet.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,64 @@ | ||
// 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.NetworkConnectivity.V1.Snippets | ||
{ | ||
// [START networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.NetworkConnectivity.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedPolicyBasedRoutingServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreatePolicyBasedRouteAsync</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 CreatePolicyBasedRouteResourceNamesAsync() | ||
{ | ||
// Create client | ||
PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = await PolicyBasedRoutingServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
PolicyBasedRoute policyBasedRoute = new PolicyBasedRoute(); | ||
string policyBasedRouteId = ""; | ||
// Make the request | ||
Operation<PolicyBasedRoute, OperationMetadata> response = await policyBasedRoutingServiceClient.CreatePolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PolicyBasedRoute, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
PolicyBasedRoute result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<PolicyBasedRoute, OperationMetadata> retrievedResponse = await policyBasedRoutingServiceClient.PollOnceCreatePolicyBasedRouteAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PolicyBasedRoute retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async_flattened_resourceNames] | ||
} |
63 changes: 63 additions & 0 deletions
63
...dSnippets/PolicyBasedRoutingServiceClient.CreatePolicyBasedRouteResourceNamesSnippet.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,63 @@ | ||
// 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.NetworkConnectivity.V1.Snippets | ||
{ | ||
// [START networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.NetworkConnectivity.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedPolicyBasedRoutingServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreatePolicyBasedRoute</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 CreatePolicyBasedRouteResourceNames() | ||
{ | ||
// Create client | ||
PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = PolicyBasedRoutingServiceClient.Create(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
PolicyBasedRoute policyBasedRoute = new PolicyBasedRoute(); | ||
string policyBasedRouteId = ""; | ||
// Make the request | ||
Operation<PolicyBasedRoute, OperationMetadata> response = policyBasedRoutingServiceClient.CreatePolicyBasedRoute(parent, policyBasedRoute, policyBasedRouteId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<PolicyBasedRoute, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
PolicyBasedRoute result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<PolicyBasedRoute, OperationMetadata> retrievedResponse = policyBasedRoutingServiceClient.PollOnceCreatePolicyBasedRoute(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
PolicyBasedRoute retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync_flattened_resourceNames] | ||
} |
Oops, something went wrong.