Skip to content

Commit

Permalink
feat: Update Compute Engine API to revision 20241201 (#966)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/googleapis@5d5b1bf

Source-Link: googleapis/googleapis-gen@c735b61
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYzczNWI2MTkzZGFlYmFhOWM0NWMyZTIzMTUzYWYxNmFlZTczMmZlNiJ9
  • Loading branch information
gcf-owl-bot[bot] committed Dec 10, 2024
1 parent da4a57a commit bf272aa
Show file tree
Hide file tree
Showing 59 changed files with 71,450 additions and 50,598 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2024 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_InstanceGroupManagers_ResumeInstances_async_flattened]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;
using lro = Google.LongRunning;

public sealed partial class GeneratedInstanceGroupManagersClientSnippets
{
/// <summary>Snippet for ResumeInstancesAsync</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 ResumeInstancesAsync()
{
// Create client
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instanceGroupManager = "";
InstanceGroupManagersResumeInstancesRequest instanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.ResumeInstancesAsync(project, zone, instanceGroupManager, instanceGroupManagersResumeInstancesRequestResource);

// 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 instanceGroupManagersClient.PollOnceResumeInstancesAsync(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_InstanceGroupManagers_ResumeInstances_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright 2024 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_InstanceGroupManagers_ResumeInstances_async]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;
using lro = Google.LongRunning;

public sealed partial class GeneratedInstanceGroupManagersClientSnippets
{
/// <summary>Snippet for ResumeInstancesAsync</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 ResumeInstancesRequestObjectAsync()
{
// Create client
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync();
// Initialize request argument(s)
ResumeInstancesInstanceGroupManagerRequest request = new ResumeInstancesInstanceGroupManagerRequest
{
Zone = "",
RequestId = "",
InstanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(),
Project = "",
InstanceGroupManager = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.ResumeInstancesAsync(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 instanceGroupManagersClient.PollOnceResumeInstancesAsync(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_InstanceGroupManagers_ResumeInstances_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright 2024 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_InstanceGroupManagers_ResumeInstances_sync]
using Google.Cloud.Compute.V1;
using lro = Google.LongRunning;

public sealed partial class GeneratedInstanceGroupManagersClientSnippets
{
/// <summary>Snippet for ResumeInstances</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 ResumeInstancesRequestObject()
{
// Create client
InstanceGroupManagersClient instanceGroupManagersClient = InstanceGroupManagersClient.Create();
// Initialize request argument(s)
ResumeInstancesInstanceGroupManagerRequest request = new ResumeInstancesInstanceGroupManagerRequest
{
Zone = "",
RequestId = "",
InstanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(),
Project = "",
InstanceGroupManager = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instanceGroupManagersClient.ResumeInstances(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 = instanceGroupManagersClient.PollOnceResumeInstances(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_InstanceGroupManagers_ResumeInstances_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2024 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_InstanceGroupManagers_ResumeInstances_sync_flattened]
using Google.Cloud.Compute.V1;
using lro = Google.LongRunning;

public sealed partial class GeneratedInstanceGroupManagersClientSnippets
{
/// <summary>Snippet for ResumeInstances</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 ResumeInstances()
{
// Create client
InstanceGroupManagersClient instanceGroupManagersClient = InstanceGroupManagersClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instanceGroupManager = "";
InstanceGroupManagersResumeInstancesRequest instanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest();
// Make the request
lro::Operation<Operation, Operation> response = instanceGroupManagersClient.ResumeInstances(project, zone, instanceGroupManager, instanceGroupManagersResumeInstancesRequestResource);

// 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 = instanceGroupManagersClient.PollOnceResumeInstances(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_InstanceGroupManagers_ResumeInstances_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2024 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_InstanceGroupManagers_StartInstances_async_flattened]
using Google.Cloud.Compute.V1;
using System.Threading.Tasks;
using lro = Google.LongRunning;

public sealed partial class GeneratedInstanceGroupManagersClientSnippets
{
/// <summary>Snippet for StartInstancesAsync</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 StartInstancesAsync()
{
// Create client
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instanceGroupManager = "";
InstanceGroupManagersStartInstancesRequest instanceGroupManagersStartInstancesRequestResource = new InstanceGroupManagersStartInstancesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.StartInstancesAsync(project, zone, instanceGroupManager, instanceGroupManagersStartInstancesRequestResource);

// 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 instanceGroupManagersClient.PollOnceStartInstancesAsync(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_InstanceGroupManagers_StartInstances_async_flattened]
}
Loading

0 comments on commit bf272aa

Please sign in to comment.