Skip to content

Commit 0c9268a

Browse files
regen: Regenerate Google.Cloud.CloudBuild.V1 at API commit 943025a
feat: Update GCB with latest proto changes PiperOrigin-RevId: 837135318 Source-Link: googleapis/googleapis@943025a
1 parent 9726b97 commit 0c9268a

File tree

60 files changed

+8792
-2121
lines changed

Some content is hidden

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

60 files changed

+8792
-2121
lines changed

apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CancelBuildAsyncSnippet.g.cs renamed to apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CancelBuild1AsyncSnippet.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace GoogleCSharpSnippets
1818
{
19-
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened]
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened1]
2020
using Google.Cloud.CloudBuild.V1;
2121
using System.Threading.Tasks;
2222

@@ -30,7 +30,7 @@ public sealed partial class GeneratedCloudBuildClientSnippets
3030
/// - It may require specifying regional endpoints when creating the service client as shown in
3131
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
3232
/// </remarks>
33-
public async Task CancelBuildAsync()
33+
public async Task CancelBuild1Async()
3434
{
3535
// Create client
3636
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
@@ -41,5 +41,5 @@ public async Task CancelBuildAsync()
4141
Build response = await cloudBuildClient.CancelBuildAsync(projectId, id);
4242
}
4343
}
44-
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened]
44+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened1]
4545
}

apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CancelBuildSnippet.g.cs renamed to apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CancelBuild1Snippet.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace GoogleCSharpSnippets
1818
{
19-
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened]
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened1]
2020
using Google.Cloud.CloudBuild.V1;
2121

2222
public sealed partial class GeneratedCloudBuildClientSnippets
@@ -29,7 +29,7 @@ public sealed partial class GeneratedCloudBuildClientSnippets
2929
/// - It may require specifying regional endpoints when creating the service client as shown in
3030
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
3131
/// </remarks>
32-
public void CancelBuild()
32+
public void CancelBuild1()
3333
{
3434
// Create client
3535
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
@@ -40,5 +40,5 @@ public void CancelBuild()
4040
Build response = cloudBuildClient.CancelBuild(projectId, id);
4141
}
4242
}
43-
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened]
43+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened1]
4444
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2025 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+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened2]
20+
using Google.Cloud.CloudBuild.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedCloudBuildClientSnippets
24+
{
25+
/// <summary>Snippet for CancelBuildAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task CancelBuild2Async()
34+
{
35+
// Create client
36+
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
37+
// Initialize request argument(s)
38+
string name = "projects/[PROJECT]/builds/[BUILD]";
39+
// Make the request
40+
Build response = await cloudBuildClient.CancelBuildAsync(name);
41+
}
42+
}
43+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened2]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2025 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+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened2_resourceNames]
20+
using Google.Cloud.CloudBuild.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedCloudBuildClientSnippets
24+
{
25+
/// <summary>Snippet for CancelBuildAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task CancelBuild2ResourceNamesAsync()
34+
{
35+
// Create client
36+
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
37+
// Initialize request argument(s)
38+
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
39+
// Make the request
40+
Build response = await cloudBuildClient.CancelBuildAsync(name);
41+
}
42+
}
43+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async_flattened2_resourceNames]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2025 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+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened2_resourceNames]
20+
using Google.Cloud.CloudBuild.V1;
21+
22+
public sealed partial class GeneratedCloudBuildClientSnippets
23+
{
24+
/// <summary>Snippet for CancelBuild</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void CancelBuild2ResourceNames()
33+
{
34+
// Create client
35+
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
36+
// Initialize request argument(s)
37+
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
38+
// Make the request
39+
Build response = cloudBuildClient.CancelBuild(name);
40+
}
41+
}
42+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened2_resourceNames]
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2025 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+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened2]
20+
using Google.Cloud.CloudBuild.V1;
21+
22+
public sealed partial class GeneratedCloudBuildClientSnippets
23+
{
24+
/// <summary>Snippet for CancelBuild</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void CancelBuild2()
33+
{
34+
// Create client
35+
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
36+
// Initialize request argument(s)
37+
string name = "projects/[PROJECT]/builds/[BUILD]";
38+
// Make the request
39+
Build response = cloudBuildClient.CancelBuild(name);
40+
}
41+
}
42+
// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync_flattened2]
43+
}

apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CreateBuildAsyncSnippet.g.cs renamed to apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CreateBuild1AsyncSnippet.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace GoogleCSharpSnippets
1818
{
19-
// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened]
19+
// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened1]
2020
using Google.Cloud.CloudBuild.V1;
2121
using Google.LongRunning;
2222
using System.Threading.Tasks;
@@ -31,7 +31,7 @@ public sealed partial class GeneratedCloudBuildClientSnippets
3131
/// - It may require specifying regional endpoints when creating the service client as shown in
3232
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
3333
/// </remarks>
34-
public async Task CreateBuildAsync()
34+
public async Task CreateBuild1Async()
3535
{
3636
// Create client
3737
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
@@ -58,5 +58,5 @@ public async Task CreateBuildAsync()
5858
}
5959
}
6060
}
61-
// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened]
61+
// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened1]
6262
}

apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CreateBuildSnippet.g.cs renamed to apis/Google.Cloud.CloudBuild.V1/Google.Cloud.CloudBuild.V1.GeneratedSnippets/CloudBuildClient.CreateBuild1Snippet.g.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace GoogleCSharpSnippets
1818
{
19-
// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_sync_flattened]
19+
// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_sync_flattened1]
2020
using Google.Cloud.CloudBuild.V1;
2121
using Google.LongRunning;
2222

@@ -30,7 +30,7 @@ public sealed partial class GeneratedCloudBuildClientSnippets
3030
/// - It may require specifying regional endpoints when creating the service client as shown in
3131
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
3232
/// </remarks>
33-
public void CreateBuild()
33+
public void CreateBuild1()
3434
{
3535
// Create client
3636
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
@@ -57,5 +57,5 @@ public void CreateBuild()
5757
}
5858
}
5959
}
60-
// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_sync_flattened]
60+
// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_sync_flattened1]
6161
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright 2025 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+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened2]
20+
using Google.Cloud.CloudBuild.V1;
21+
using Google.LongRunning;
22+
using System.Threading.Tasks;
23+
24+
public sealed partial class GeneratedCloudBuildClientSnippets
25+
{
26+
/// <summary>Snippet for CreateBuildAsync</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public async Task CreateBuild2Async()
35+
{
36+
// Create client
37+
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
38+
// Initialize request argument(s)
39+
string parent = "projects/[PROJECT]";
40+
// Make the request
41+
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
42+
43+
// Poll until the returned long-running operation is complete
44+
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
45+
// Retrieve the operation result
46+
Build result = completedResponse.Result;
47+
48+
// Or get the name of the operation
49+
string operationName = response.Name;
50+
// This name can be stored, then the long-running operation retrieved later by name
51+
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
52+
// Check if the retrieved long-running operation has completed
53+
if (retrievedResponse.IsCompleted)
54+
{
55+
// If it has completed, then access the result
56+
Build retrievedResult = retrievedResponse.Result;
57+
}
58+
}
59+
}
60+
// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_async_flattened2]
61+
}

0 commit comments

Comments
 (0)