Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#228)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent 64ff6a2 commit 35a65fc
Show file tree
Hide file tree
Showing 39 changed files with 4,116 additions and 0 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_cloudbuild_v1_CloudBuild_ApproveBuild_async]
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_generated_cloudbuild_v1_CloudBuild_ApproveBuild_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_cloudbuild_v1_CloudBuild_ApproveBuild_sync]
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_generated_cloudbuild_v1_CloudBuild_ApproveBuild_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_cloudbuild_v1_CloudBuild_CancelBuild_async]
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_generated_cloudbuild_v1_CloudBuild_CancelBuild_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_cloudbuild_v1_CloudBuild_CancelBuild_sync]
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_generated_cloudbuild_v1_CloudBuild_CancelBuild_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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 CreateBuild
# 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_generated_cloudbuild_v1_CloudBuild_CreateBuild_async]
from google.cloud.devtools import cloudbuild_v1


async def sample_create_build():
# Create a client
client = cloudbuild_v1.CloudBuildAsyncClient()

# Initialize request argument(s)
request = cloudbuild_v1.CreateBuildRequest(
project_id="project_id_value",
)

# Make the request
operation = client.create_build(request=request)

print("Waiting for operation to complete...")

response = await operation.result()

# Handle the response
print(response)

# [END cloudbuild_generated_cloudbuild_v1_CloudBuild_CreateBuild_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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 CreateBuild
# 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_generated_cloudbuild_v1_CloudBuild_CreateBuild_sync]
from google.cloud.devtools import cloudbuild_v1


def sample_create_build():
# Create a client
client = cloudbuild_v1.CloudBuildClient()

# Initialize request argument(s)
request = cloudbuild_v1.CreateBuildRequest(
project_id="project_id_value",
)

# Make the request
operation = client.create_build(request=request)

print("Waiting for operation to complete...")

response = operation.result()

# Handle the response
print(response)

# [END cloudbuild_generated_cloudbuild_v1_CloudBuild_CreateBuild_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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 CreateBuildTrigger
# 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_generated_cloudbuild_v1_CloudBuild_CreateBuildTrigger_async]
from google.cloud.devtools import cloudbuild_v1


async def sample_create_build_trigger():
# Create a client
client = cloudbuild_v1.CloudBuildAsyncClient()

# Initialize request argument(s)
trigger = cloudbuild_v1.BuildTrigger()
trigger.autodetect = True

request = cloudbuild_v1.CreateBuildTriggerRequest(
project_id="project_id_value",
trigger=trigger,
)

# Make the request
response = await client.create_build_trigger(request=request)

# Handle the response
print(response)

# [END cloudbuild_generated_cloudbuild_v1_CloudBuild_CreateBuildTrigger_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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 CreateBuildTrigger
# 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_generated_cloudbuild_v1_CloudBuild_CreateBuildTrigger_sync]
from google.cloud.devtools import cloudbuild_v1


def sample_create_build_trigger():
# Create a client
client = cloudbuild_v1.CloudBuildClient()

# Initialize request argument(s)
trigger = cloudbuild_v1.BuildTrigger()
trigger.autodetect = True

request = cloudbuild_v1.CreateBuildTriggerRequest(
project_id="project_id_value",
trigger=trigger,
)

# Make the request
response = client.create_build_trigger(request=request)

# Handle the response
print(response)

# [END cloudbuild_generated_cloudbuild_v1_CloudBuild_CreateBuildTrigger_sync]
Loading

0 comments on commit 35a65fc

Please sign in to comment.