forked from googleapis/google-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regenerate client locally; add client-specific post processing
- Loading branch information
Showing
75 changed files
with
8,881 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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
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
56 changes: 56 additions & 0 deletions
56
...uild/samples/generated_samples/cloudbuild_v1_generated_cloud_build_approve_build_async.py
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,56 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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! | ||
# | ||
# Snippet for ApproveBuild | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-build | ||
|
||
|
||
# [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_async] | ||
# 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://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud.devtools import cloudbuild_v1 | ||
|
||
|
||
async def sample_approve_build(): | ||
# Create a client | ||
client = cloudbuild_v1.CloudBuildAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = cloudbuild_v1.ApproveBuildRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.approve_build(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = (await operation).result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END cloudbuild_v1_generated_CloudBuild_ApproveBuild_async] |
56 changes: 56 additions & 0 deletions
56
...build/samples/generated_samples/cloudbuild_v1_generated_cloud_build_approve_build_sync.py
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,56 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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! | ||
# | ||
# Snippet for ApproveBuild | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-build | ||
|
||
|
||
# [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] | ||
# 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://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud.devtools import cloudbuild_v1 | ||
|
||
|
||
def sample_approve_build(): | ||
# Create a client | ||
client = cloudbuild_v1.CloudBuildClient() | ||
|
||
# Initialize request argument(s) | ||
request = cloudbuild_v1.ApproveBuildRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.approve_build(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = operation.result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] |
53 changes: 53 additions & 0 deletions
53
...build/samples/generated_samples/cloudbuild_v1_generated_cloud_build_cancel_build_async.py
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,53 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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! | ||
# | ||
# Snippet for CancelBuild | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-build | ||
|
||
|
||
# [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async] | ||
# 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://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud.devtools import cloudbuild_v1 | ||
|
||
|
||
async def sample_cancel_build(): | ||
# Create a client | ||
client = cloudbuild_v1.CloudBuildAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = cloudbuild_v1.CancelBuildRequest( | ||
project_id="project_id_value", | ||
id="id_value", | ||
) | ||
|
||
# Make the request | ||
response = await client.cancel_build(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async] |
53 changes: 53 additions & 0 deletions
53
...-build/samples/generated_samples/cloudbuild_v1_generated_cloud_build_cancel_build_sync.py
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,53 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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! | ||
# | ||
# Snippet for CancelBuild | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-build | ||
|
||
|
||
# [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] | ||
# 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://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud.devtools import cloudbuild_v1 | ||
|
||
|
||
def sample_cancel_build(): | ||
# Create a client | ||
client = cloudbuild_v1.CloudBuildClient() | ||
|
||
# Initialize request argument(s) | ||
request = cloudbuild_v1.CancelBuildRequest( | ||
project_id="project_id_value", | ||
id="id_value", | ||
) | ||
|
||
# Make the request | ||
response = client.cancel_build(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] |
Oops, something went wrong.