Skip to content

Commit

Permalink
feat: Update Compute Engine API to revision 20250211
Browse files Browse the repository at this point in the history
Source-Link: googleapis/googleapis@5eaeba4

Source-Link: googleapis/googleapis-gen@9977e2a
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiOTk3N2UyYWI4MDAxOTQ0MDRiNGRlZjg5MTVhYjUyNWY2MzkwMmE2NiJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Feb 18, 2025
1 parent 0f261f0 commit 9a5de4b
Show file tree
Hide file tree
Showing 32 changed files with 31,448 additions and 19,818 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START compute_v1_generated_Routers_DeleteRoutePolicy_async_flattened]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;
using lro = Google.LongRunning;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for DeleteRoutePolicyAsync</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 DeleteRoutePolicyAsync()
{
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteRoutePolicyAsync(project, region, router);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteRoutePolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
}
}
// [END compute_v1_generated_Routers_DeleteRoutePolicy_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START compute_v1_generated_Routers_DeleteRoutePolicy_async]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;
using lro = Google.LongRunning;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for DeleteRoutePolicyAsync</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 DeleteRoutePolicyRequestObjectAsync()
{
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
DeleteRoutePolicyRouterRequest request = new DeleteRoutePolicyRouterRequest
{
RequestId = "",
Policy = "",
Region = "",
Router = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteRoutePolicyAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteRoutePolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
}
}
// [END compute_v1_generated_Routers_DeleteRoutePolicy_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START compute_v1_generated_Routers_DeleteRoutePolicy_sync]
using Google.Cloud.Compute.V1;
using lro = Google.LongRunning;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for DeleteRoutePolicy</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 DeleteRoutePolicyRequestObject()
{
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
DeleteRoutePolicyRouterRequest request = new DeleteRoutePolicyRouterRequest
{
RequestId = "",
Policy = "",
Region = "",
Router = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.DeleteRoutePolicy(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceDeleteRoutePolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
}
}
// [END compute_v1_generated_Routers_DeleteRoutePolicy_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START compute_v1_generated_Routers_DeleteRoutePolicy_sync_flattened]
using Google.Cloud.Compute.V1;
using lro = Google.LongRunning;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for DeleteRoutePolicy</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 DeleteRoutePolicy()
{
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = routersClient.DeleteRoutePolicy(project, region, router);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceDeleteRoutePolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
}
}
// [END compute_v1_generated_Routers_DeleteRoutePolicy_sync_flattened]
}
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 compute_v1_generated_Routers_GetRoutePolicy_async_flattened]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for GetRoutePolicyAsync</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 GetRoutePolicyAsync()
{
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RoutersGetRoutePolicyResponse response = await routersClient.GetRoutePolicyAsync(project, region, router);
}
}
// [END compute_v1_generated_Routers_GetRoutePolicy_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// 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 compute_v1_generated_Routers_GetRoutePolicy_async]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedRoutersClientSnippets
{
/// <summary>Snippet for GetRoutePolicyAsync</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 GetRoutePolicyRequestObjectAsync()
{
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRoutePolicyRouterRequest request = new GetRoutePolicyRouterRequest
{
Policy = "",
Region = "",
Router = "",
Project = "",
};
// Make the request
RoutersGetRoutePolicyResponse response = await routersClient.GetRoutePolicyAsync(request);
}
}
// [END compute_v1_generated_Routers_GetRoutePolicy_async]
}
Loading

0 comments on commit 9a5de4b

Please sign in to comment.