Skip to content

Commit 613ccbc

Browse files
feat: Update Compute Engine API to revision 20240407 (#890)
Source-Link: googleapis/googleapis@018c0e3 Source-Link: googleapis/googleapis-gen@dad8476 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiZGFkODQ3NmM5NGViMWVjYjJmZDcyZjI5NjgyNWU5NjIxZWE4YjQ1ZCJ9
1 parent 773d751 commit 613ccbc

File tree

95 files changed

+264474
-227462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+264474
-227462
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
#pragma warning disable CS8981
18+
19+
namespace GoogleCSharpSnippets
20+
{
21+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async_flattened]
22+
using Google.Cloud.Compute.V1;
23+
using System.Threading.Tasks;
24+
using lro = Google.LongRunning;
25+
26+
public sealed partial class GeneratedInstanceGroupManagerResizeRequestsClientSnippets
27+
{
28+
/// <summary>Snippet for CancelAsync</summary>
29+
/// <remarks>
30+
/// This snippet has been automatically generated and should be regarded as a code template only.
31+
/// It will require modifications to work:
32+
/// - It may require correct/in-range values for request initialization.
33+
/// - It may require specifying regional endpoints when creating the service client as shown in
34+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
35+
/// </remarks>
36+
public async Task CancelAsync()
37+
{
38+
// Create client
39+
InstanceGroupManagerResizeRequestsClient instanceGroupManagerResizeRequestsClient = await InstanceGroupManagerResizeRequestsClient.CreateAsync();
40+
// Initialize request argument(s)
41+
string project = "";
42+
string zone = "";
43+
string instanceGroupManager = "";
44+
string resizeRequest = "";
45+
// Make the request
46+
lro::Operation<Operation, Operation> response = await instanceGroupManagerResizeRequestsClient.CancelAsync(project, zone, instanceGroupManager, resizeRequest);
47+
48+
// Poll until the returned long-running operation is complete
49+
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
50+
// Retrieve the operation result
51+
Operation result = completedResponse.Result;
52+
53+
// Or get the name of the operation
54+
string operationName = response.Name;
55+
// This name can be stored, then the long-running operation retrieved later by name
56+
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagerResizeRequestsClient.PollOnceCancelAsync(operationName);
57+
// Check if the retrieved long-running operation has completed
58+
if (retrievedResponse.IsCompleted)
59+
{
60+
// If it has completed, then access the result
61+
Operation retrievedResult = retrievedResponse.Result;
62+
}
63+
}
64+
}
65+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async_flattened]
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
#pragma warning disable CS8981
18+
19+
namespace GoogleCSharpSnippets
20+
{
21+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async]
22+
using Google.Cloud.Compute.V1;
23+
using System.Threading.Tasks;
24+
using lro = Google.LongRunning;
25+
26+
public sealed partial class GeneratedInstanceGroupManagerResizeRequestsClientSnippets
27+
{
28+
/// <summary>Snippet for CancelAsync</summary>
29+
/// <remarks>
30+
/// This snippet has been automatically generated and should be regarded as a code template only.
31+
/// It will require modifications to work:
32+
/// - It may require correct/in-range values for request initialization.
33+
/// - It may require specifying regional endpoints when creating the service client as shown in
34+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
35+
/// </remarks>
36+
public async Task CancelRequestObjectAsync()
37+
{
38+
// Create client
39+
InstanceGroupManagerResizeRequestsClient instanceGroupManagerResizeRequestsClient = await InstanceGroupManagerResizeRequestsClient.CreateAsync();
40+
// Initialize request argument(s)
41+
CancelInstanceGroupManagerResizeRequestRequest request = new CancelInstanceGroupManagerResizeRequestRequest
42+
{
43+
Zone = "",
44+
RequestId = "",
45+
ResizeRequest = "",
46+
Project = "",
47+
InstanceGroupManager = "",
48+
};
49+
// Make the request
50+
lro::Operation<Operation, Operation> response = await instanceGroupManagerResizeRequestsClient.CancelAsync(request);
51+
52+
// Poll until the returned long-running operation is complete
53+
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
54+
// Retrieve the operation result
55+
Operation result = completedResponse.Result;
56+
57+
// Or get the name of the operation
58+
string operationName = response.Name;
59+
// This name can be stored, then the long-running operation retrieved later by name
60+
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagerResizeRequestsClient.PollOnceCancelAsync(operationName);
61+
// Check if the retrieved long-running operation has completed
62+
if (retrievedResponse.IsCompleted)
63+
{
64+
// If it has completed, then access the result
65+
Operation retrievedResult = retrievedResponse.Result;
66+
}
67+
}
68+
}
69+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async]
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
#pragma warning disable CS8981
18+
19+
namespace GoogleCSharpSnippets
20+
{
21+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_sync]
22+
using Google.Cloud.Compute.V1;
23+
using lro = Google.LongRunning;
24+
25+
public sealed partial class GeneratedInstanceGroupManagerResizeRequestsClientSnippets
26+
{
27+
/// <summary>Snippet for Cancel</summary>
28+
/// <remarks>
29+
/// This snippet has been automatically generated and should be regarded as a code template only.
30+
/// It will require modifications to work:
31+
/// - It may require correct/in-range values for request initialization.
32+
/// - It may require specifying regional endpoints when creating the service client as shown in
33+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
34+
/// </remarks>
35+
public void CancelRequestObject()
36+
{
37+
// Create client
38+
InstanceGroupManagerResizeRequestsClient instanceGroupManagerResizeRequestsClient = InstanceGroupManagerResizeRequestsClient.Create();
39+
// Initialize request argument(s)
40+
CancelInstanceGroupManagerResizeRequestRequest request = new CancelInstanceGroupManagerResizeRequestRequest
41+
{
42+
Zone = "",
43+
RequestId = "",
44+
ResizeRequest = "",
45+
Project = "",
46+
InstanceGroupManager = "",
47+
};
48+
// Make the request
49+
lro::Operation<Operation, Operation> response = instanceGroupManagerResizeRequestsClient.Cancel(request);
50+
51+
// Poll until the returned long-running operation is complete
52+
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
53+
// Retrieve the operation result
54+
Operation result = completedResponse.Result;
55+
56+
// Or get the name of the operation
57+
string operationName = response.Name;
58+
// This name can be stored, then the long-running operation retrieved later by name
59+
lro::Operation<Operation, Operation> retrievedResponse = instanceGroupManagerResizeRequestsClient.PollOnceCancel(operationName);
60+
// Check if the retrieved long-running operation has completed
61+
if (retrievedResponse.IsCompleted)
62+
{
63+
// If it has completed, then access the result
64+
Operation retrievedResult = retrievedResponse.Result;
65+
}
66+
}
67+
}
68+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_sync]
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
#pragma warning disable CS8981
18+
19+
namespace GoogleCSharpSnippets
20+
{
21+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_sync_flattened]
22+
using Google.Cloud.Compute.V1;
23+
using lro = Google.LongRunning;
24+
25+
public sealed partial class GeneratedInstanceGroupManagerResizeRequestsClientSnippets
26+
{
27+
/// <summary>Snippet for Cancel</summary>
28+
/// <remarks>
29+
/// This snippet has been automatically generated and should be regarded as a code template only.
30+
/// It will require modifications to work:
31+
/// - It may require correct/in-range values for request initialization.
32+
/// - It may require specifying regional endpoints when creating the service client as shown in
33+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
34+
/// </remarks>
35+
public void Cancel()
36+
{
37+
// Create client
38+
InstanceGroupManagerResizeRequestsClient instanceGroupManagerResizeRequestsClient = InstanceGroupManagerResizeRequestsClient.Create();
39+
// Initialize request argument(s)
40+
string project = "";
41+
string zone = "";
42+
string instanceGroupManager = "";
43+
string resizeRequest = "";
44+
// Make the request
45+
lro::Operation<Operation, Operation> response = instanceGroupManagerResizeRequestsClient.Cancel(project, zone, instanceGroupManager, resizeRequest);
46+
47+
// Poll until the returned long-running operation is complete
48+
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
49+
// Retrieve the operation result
50+
Operation result = completedResponse.Result;
51+
52+
// Or get the name of the operation
53+
string operationName = response.Name;
54+
// This name can be stored, then the long-running operation retrieved later by name
55+
lro::Operation<Operation, Operation> retrievedResponse = instanceGroupManagerResizeRequestsClient.PollOnceCancel(operationName);
56+
// Check if the retrieved long-running operation has completed
57+
if (retrievedResponse.IsCompleted)
58+
{
59+
// If it has completed, then access the result
60+
Operation retrievedResult = retrievedResponse.Result;
61+
}
62+
}
63+
}
64+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_sync_flattened]
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
#pragma warning disable CS8981
18+
19+
namespace GoogleCSharpSnippets
20+
{
21+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Delete_async_flattened]
22+
using Google.Cloud.Compute.V1;
23+
using System.Threading.Tasks;
24+
using lro = Google.LongRunning;
25+
26+
public sealed partial class GeneratedInstanceGroupManagerResizeRequestsClientSnippets
27+
{
28+
/// <summary>Snippet for DeleteAsync</summary>
29+
/// <remarks>
30+
/// This snippet has been automatically generated and should be regarded as a code template only.
31+
/// It will require modifications to work:
32+
/// - It may require correct/in-range values for request initialization.
33+
/// - It may require specifying regional endpoints when creating the service client as shown in
34+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
35+
/// </remarks>
36+
public async Task DeleteAsync()
37+
{
38+
// Create client
39+
InstanceGroupManagerResizeRequestsClient instanceGroupManagerResizeRequestsClient = await InstanceGroupManagerResizeRequestsClient.CreateAsync();
40+
// Initialize request argument(s)
41+
string project = "";
42+
string zone = "";
43+
string instanceGroupManager = "";
44+
string resizeRequest = "";
45+
// Make the request
46+
lro::Operation<Operation, Operation> response = await instanceGroupManagerResizeRequestsClient.DeleteAsync(project, zone, instanceGroupManager, resizeRequest);
47+
48+
// Poll until the returned long-running operation is complete
49+
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
50+
// Retrieve the operation result
51+
Operation result = completedResponse.Result;
52+
53+
// Or get the name of the operation
54+
string operationName = response.Name;
55+
// This name can be stored, then the long-running operation retrieved later by name
56+
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagerResizeRequestsClient.PollOnceDeleteAsync(operationName);
57+
// Check if the retrieved long-running operation has completed
58+
if (retrievedResponse.IsCompleted)
59+
{
60+
// If it has completed, then access the result
61+
Operation retrievedResult = retrievedResponse.Result;
62+
}
63+
}
64+
}
65+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Delete_async_flattened]
66+
}

0 commit comments

Comments
 (0)