Skip to content

Commit 0ea1c2c

Browse files
committed
regenerate client locally; add client-specific post processing
1 parent 49809b7 commit 0ea1c2c

File tree

75 files changed

+8881
-27
lines changed

Some content is hidden

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

75 files changed

+8881
-27
lines changed

packages/google-cloud-build/docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ API Reference
1111
.. toctree::
1212
:maxdepth: 2
1313

14-
cloudbuild_v1/services
15-
cloudbuild_v1/types
14+
cloudbuild_v1/services_
15+
cloudbuild_v1/types_
1616

1717
API Reference
1818
-------------
1919
.. toctree::
2020
:maxdepth: 2
2121

22-
cloudbuild_v2/services
23-
cloudbuild_v2/types
22+
cloudbuild_v2/services_
23+
cloudbuild_v2/types_
2424

2525

2626
Changelog

packages/google-cloud-build/google/cloud/devtools/cloudbuild/gapic_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2022 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.20.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/gapic_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2022 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.20.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/gapic_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2022 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.20.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-build/noxfile.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,44 @@
2222
import pathlib
2323
import re
2424
import shutil
25+
from typing import Dict, List
2526
import warnings
2627

2728
import nox
2829

29-
BLACK_VERSION = "black==22.3.0"
30-
ISORT_VERSION = "isort==5.10.1"
30+
BLACK_VERSION = "black[jupyter]==23.7.0"
31+
ISORT_VERSION = "isort==5.11.0"
32+
3133
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3234

35+
3336
DEFAULT_PYTHON_VERSION = "3.9"
3437

35-
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
38+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
3639
UNIT_TEST_STANDARD_DEPENDENCIES = [
3740
"mock",
3841
"asyncmock",
3942
"pytest",
4043
"pytest-cov",
4144
"pytest-asyncio",
4245
]
43-
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
44-
UNIT_TEST_LOCAL_DEPENDENCIES = []
45-
UNIT_TEST_DEPENDENCIES = []
46-
UNIT_TEST_EXTRAS = []
47-
UNIT_TEST_EXTRAS_BY_PYTHON = {}
46+
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
47+
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
48+
UNIT_TEST_DEPENDENCIES: List[str] = []
49+
UNIT_TEST_EXTRAS: List[str] = []
50+
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
4851

49-
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
52+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11"]
5053
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
5154
"mock",
5255
"pytest",
5356
"google-cloud-testutils",
5457
]
55-
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = []
56-
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
57-
SYSTEM_TEST_DEPENDENCIES = []
58-
SYSTEM_TEST_EXTRAS = []
59-
SYSTEM_TEST_EXTRAS_BY_PYTHON = {}
58+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
59+
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
60+
SYSTEM_TEST_DEPENDENCIES: List[str] = []
61+
SYSTEM_TEST_EXTRAS: List[str] = []
62+
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
6063

6164
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
6265

@@ -88,6 +91,7 @@ def lint(session):
8891
"--check",
8992
*LINT_PATHS,
9093
)
94+
9195
session.run("flake8", "google", "tests")
9296

9397

@@ -187,7 +191,6 @@ def unit(session):
187191

188192

189193
def install_systemtest_dependencies(session, *constraints):
190-
191194
# Use pre-release gRPC for system tests.
192195
# Exclude version 1.52.0rc1 which has a known issue.
193196
# See https://github.com/grpc/grpc/issues/32163
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ApproveBuild
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-build
24+
25+
26+
# [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# 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
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import cloudbuild_v1
35+
36+
37+
async def sample_approve_build():
38+
# Create a client
39+
client = cloudbuild_v1.CloudBuildAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = cloudbuild_v1.ApproveBuildRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
operation = client.approve_build(request=request)
48+
49+
print("Waiting for operation to complete...")
50+
51+
response = (await operation).result()
52+
53+
# Handle the response
54+
print(response)
55+
56+
# [END cloudbuild_v1_generated_CloudBuild_ApproveBuild_async]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ApproveBuild
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-build
24+
25+
26+
# [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# 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
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import cloudbuild_v1
35+
36+
37+
def sample_approve_build():
38+
# Create a client
39+
client = cloudbuild_v1.CloudBuildClient()
40+
41+
# Initialize request argument(s)
42+
request = cloudbuild_v1.ApproveBuildRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
operation = client.approve_build(request=request)
48+
49+
print("Waiting for operation to complete...")
50+
51+
response = operation.result()
52+
53+
# Handle the response
54+
print(response)
55+
56+
# [END cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CancelBuild
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-build
24+
25+
26+
# [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# 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
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import cloudbuild_v1
35+
36+
37+
async def sample_cancel_build():
38+
# Create a client
39+
client = cloudbuild_v1.CloudBuildAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = cloudbuild_v1.CancelBuildRequest(
43+
project_id="project_id_value",
44+
id="id_value",
45+
)
46+
47+
# Make the request
48+
response = await client.cancel_build(request=request)
49+
50+
# Handle the response
51+
print(response)
52+
53+
# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2023 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CancelBuild
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-build
24+
25+
26+
# [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# 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
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud.devtools import cloudbuild_v1
35+
36+
37+
def sample_cancel_build():
38+
# Create a client
39+
client = cloudbuild_v1.CloudBuildClient()
40+
41+
# Initialize request argument(s)
42+
request = cloudbuild_v1.CancelBuildRequest(
43+
project_id="project_id_value",
44+
id="id_value",
45+
)
46+
47+
# Make the request
48+
response = client.cancel_build(request=request)
49+
50+
# Handle the response
51+
print(response)
52+
53+
# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync]

0 commit comments

Comments
 (0)