Skip to content

Commit f567a7e

Browse files
chore: Use gapic-generator-python 0.65.0 (#263)
* chore: Use gapic-generator-python 0.65.0 PiperOrigin-RevId: 440970084 Source-Link: googleapis/googleapis@5e0a3d5 Source-Link: googleapis/googleapis-gen@b0c628a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 * 🦉 Updates from OwlBot post-processor 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>
1 parent 1c74857 commit f567a7e

File tree

6 files changed

+103
-83
lines changed

6 files changed

+103
-83
lines changed

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core.client_options import ClientOptions
@@ -244,7 +244,6 @@ async def create_build(
244244
the build ID. Pass the build ID to ``GetBuild`` to determine the
245245
build status (such as ``SUCCESS`` or ``FAILURE``).
246246
247-
248247
.. code-block:: python
249248
250249
from google.cloud.devtools import cloudbuild_v1
@@ -380,7 +379,6 @@ async def get_build(
380379
``SUCCESS``, ``FAILURE``, or ``WORKING``), and timing
381380
information.
382381
383-
384382
.. code-block:: python
385383
386384
from google.cloud.devtools import cloudbuild_v1
@@ -475,8 +473,7 @@ def sample_get_build():
475473
maximum=60.0,
476474
multiplier=1.3,
477475
predicate=retries.if_exception_type(
478-
core_exceptions.DeadlineExceeded,
479-
core_exceptions.ServiceUnavailable,
476+
core_exceptions.GoogleAPICallError,
480477
),
481478
deadline=600.0,
482479
),
@@ -509,7 +506,6 @@ async def list_builds(
509506
Previously requested builds may still be in-progress, or
510507
may have finished successfully or unsuccessfully.
511508
512-
513509
.. code-block:: python
514510
515511
from google.cloud.devtools import cloudbuild_v1
@@ -587,8 +583,7 @@ def sample_list_builds():
587583
maximum=60.0,
588584
multiplier=1.3,
589585
predicate=retries.if_exception_type(
590-
core_exceptions.DeadlineExceeded,
591-
core_exceptions.ServiceUnavailable,
586+
core_exceptions.GoogleAPICallError,
592587
),
593588
deadline=600.0,
594589
),
@@ -773,7 +768,6 @@ async def retry_build(
773768
available depending on the bucket's lifecycle management
774769
settings.
775770
776-
777771
.. code-block:: python
778772
779773
from google.cloud.devtools import cloudbuild_v1
@@ -912,7 +906,6 @@ async def approve_build(
912906
913907
If rejected, the returned LRO will be immediately done.
914908
915-
916909
.. code-block:: python
917910
918911
from google.cloud.devtools import cloudbuild_v1
@@ -1055,7 +1048,6 @@ async def create_build_trigger(
10551048
10561049
This API is experimental.
10571050
1058-
10591051
.. code-block:: python
10601052
10611053
from google.cloud.devtools import cloudbuild_v1
@@ -1160,7 +1152,6 @@ async def get_build_trigger(
11601152
11611153
This API is experimental.
11621154
1163-
11641155
.. code-block:: python
11651156
11661157
from google.cloud.devtools import cloudbuild_v1
@@ -1240,8 +1231,7 @@ def sample_get_build_trigger():
12401231
maximum=60.0,
12411232
multiplier=1.3,
12421233
predicate=retries.if_exception_type(
1243-
core_exceptions.DeadlineExceeded,
1244-
core_exceptions.ServiceUnavailable,
1234+
core_exceptions.GoogleAPICallError,
12451235
),
12461236
deadline=600.0,
12471237
),
@@ -1273,7 +1263,6 @@ async def list_build_triggers(
12731263
12741264
This API is experimental.
12751265
1276-
12771266
.. code-block:: python
12781267
12791268
from google.cloud.devtools import cloudbuild_v1
@@ -1345,8 +1334,7 @@ def sample_list_build_triggers():
13451334
maximum=60.0,
13461335
multiplier=1.3,
13471336
predicate=retries.if_exception_type(
1348-
core_exceptions.DeadlineExceeded,
1349-
core_exceptions.ServiceUnavailable,
1337+
core_exceptions.GoogleAPICallError,
13501338
),
13511339
deadline=600.0,
13521340
),
@@ -1388,7 +1376,6 @@ async def delete_build_trigger(
13881376
13891377
This API is experimental.
13901378
1391-
13921379
.. code-block:: python
13931380
13941381
from google.cloud.devtools import cloudbuild_v1
@@ -1455,8 +1442,7 @@ def sample_delete_build_trigger():
14551442
maximum=60.0,
14561443
multiplier=1.3,
14571444
predicate=retries.if_exception_type(
1458-
core_exceptions.DeadlineExceeded,
1459-
core_exceptions.ServiceUnavailable,
1445+
core_exceptions.GoogleAPICallError,
14601446
),
14611447
deadline=600.0,
14621448
),
@@ -1487,7 +1473,6 @@ async def update_build_trigger(
14871473
14881474
This API is experimental.
14891475
1490-
14911476
.. code-block:: python
14921477
14931478
from google.cloud.devtools import cloudbuild_v1
@@ -1738,7 +1723,6 @@ async def receive_trigger_webhook(
17381723
r"""ReceiveTriggerWebhook [Experimental] is called when the API
17391724
receives a webhook request targeted at a specific trigger.
17401725
1741-
17421726
.. code-block:: python
17431727
17441728
from google.cloud.devtools import cloudbuild_v1
@@ -2037,8 +2021,7 @@ def sample_get_worker_pool():
20372021
maximum=60.0,
20382022
multiplier=1.3,
20392023
predicate=retries.if_exception_type(
2040-
core_exceptions.DeadlineExceeded,
2041-
core_exceptions.ServiceUnavailable,
2024+
core_exceptions.GoogleAPICallError,
20422025
),
20432026
deadline=600.0,
20442027
),
@@ -2402,8 +2385,7 @@ def sample_list_worker_pools():
24022385
maximum=60.0,
24032386
multiplier=1.3,
24042387
predicate=retries.if_exception_type(
2405-
core_exceptions.DeadlineExceeded,
2406-
core_exceptions.ServiceUnavailable,
2388+
core_exceptions.GoogleAPICallError,
24072389
),
24082390
deadline=600.0,
24092391
),

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core import client_options as client_options_lib
@@ -611,7 +611,6 @@ def create_build(
611611
the build ID. Pass the build ID to ``GetBuild`` to determine the
612612
build status (such as ``SUCCESS`` or ``FAILURE``).
613613
614-
615614
.. code-block:: python
616615
617616
from google.cloud.devtools import cloudbuild_v1
@@ -747,7 +746,6 @@ def get_build(
747746
``SUCCESS``, ``FAILURE``, or ``WORKING``), and timing
748747
information.
749748
750-
751749
.. code-block:: python
752750
753751
from google.cloud.devtools import cloudbuild_v1
@@ -866,7 +864,6 @@ def list_builds(
866864
Previously requested builds may still be in-progress, or
867865
may have finished successfully or unsuccessfully.
868866
869-
870867
.. code-block:: python
871868
872869
from google.cloud.devtools import cloudbuild_v1
@@ -1120,7 +1117,6 @@ def retry_build(
11201117
available depending on the bucket's lifecycle management
11211118
settings.
11221119
1123-
11241120
.. code-block:: python
11251121
11261122
from google.cloud.devtools import cloudbuild_v1
@@ -1259,7 +1255,6 @@ def approve_build(
12591255
12601256
If rejected, the returned LRO will be immediately done.
12611257
1262-
12631258
.. code-block:: python
12641259
12651260
from google.cloud.devtools import cloudbuild_v1
@@ -1402,7 +1397,6 @@ def create_build_trigger(
14021397
14031398
This API is experimental.
14041399
1405-
14061400
.. code-block:: python
14071401
14081402
from google.cloud.devtools import cloudbuild_v1
@@ -1507,7 +1501,6 @@ def get_build_trigger(
15071501
15081502
This API is experimental.
15091503
1510-
15111504
.. code-block:: python
15121505
15131506
from google.cloud.devtools import cloudbuild_v1
@@ -1610,7 +1603,6 @@ def list_build_triggers(
16101603
16111604
This API is experimental.
16121605
1613-
16141606
.. code-block:: python
16151607
16161608
from google.cloud.devtools import cloudbuild_v1
@@ -1715,7 +1707,6 @@ def delete_build_trigger(
17151707
17161708
This API is experimental.
17171709
1718-
17191710
.. code-block:: python
17201711
17211712
from google.cloud.devtools import cloudbuild_v1
@@ -1804,7 +1795,6 @@ def update_build_trigger(
18041795
18051796
This API is experimental.
18061797
1807-
18081798
.. code-block:: python
18091799
18101800
from google.cloud.devtools import cloudbuild_v1
@@ -2055,7 +2045,6 @@ def receive_trigger_webhook(
20552045
r"""ReceiveTriggerWebhook [Experimental] is called when the API
20562046
receives a webhook request targeted at a specific trigger.
20572047
2058-
20592048
.. code-block:: python
20602049
20612050
from google.cloud.devtools import cloudbuild_v1

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/base.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(
8383
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8484
be used for service account credentials.
8585
"""
86+
8687
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8788
if ":" not in host:
8889
host += ":443"
@@ -135,8 +136,7 @@ def _prep_wrapped_messages(self, client_info):
135136
maximum=60.0,
136137
multiplier=1.3,
137138
predicate=retries.if_exception_type(
138-
core_exceptions.DeadlineExceeded,
139-
core_exceptions.ServiceUnavailable,
139+
core_exceptions.GoogleAPICallError,
140140
),
141141
deadline=600.0,
142142
),
@@ -150,8 +150,7 @@ def _prep_wrapped_messages(self, client_info):
150150
maximum=60.0,
151151
multiplier=1.3,
152152
predicate=retries.if_exception_type(
153-
core_exceptions.DeadlineExceeded,
154-
core_exceptions.ServiceUnavailable,
153+
core_exceptions.GoogleAPICallError,
155154
),
156155
deadline=600.0,
157156
),
@@ -185,8 +184,7 @@ def _prep_wrapped_messages(self, client_info):
185184
maximum=60.0,
186185
multiplier=1.3,
187186
predicate=retries.if_exception_type(
188-
core_exceptions.DeadlineExceeded,
189-
core_exceptions.ServiceUnavailable,
187+
core_exceptions.GoogleAPICallError,
190188
),
191189
deadline=600.0,
192190
),
@@ -200,8 +198,7 @@ def _prep_wrapped_messages(self, client_info):
200198
maximum=60.0,
201199
multiplier=1.3,
202200
predicate=retries.if_exception_type(
203-
core_exceptions.DeadlineExceeded,
204-
core_exceptions.ServiceUnavailable,
201+
core_exceptions.GoogleAPICallError,
205202
),
206203
deadline=600.0,
207204
),
@@ -215,8 +212,7 @@ def _prep_wrapped_messages(self, client_info):
215212
maximum=60.0,
216213
multiplier=1.3,
217214
predicate=retries.if_exception_type(
218-
core_exceptions.DeadlineExceeded,
219-
core_exceptions.ServiceUnavailable,
215+
core_exceptions.GoogleAPICallError,
220216
),
221217
deadline=600.0,
222218
),
@@ -250,8 +246,7 @@ def _prep_wrapped_messages(self, client_info):
250246
maximum=60.0,
251247
multiplier=1.3,
252248
predicate=retries.if_exception_type(
253-
core_exceptions.DeadlineExceeded,
254-
core_exceptions.ServiceUnavailable,
249+
core_exceptions.GoogleAPICallError,
255250
),
256251
deadline=600.0,
257252
),
@@ -275,8 +270,7 @@ def _prep_wrapped_messages(self, client_info):
275270
maximum=60.0,
276271
multiplier=1.3,
277272
predicate=retries.if_exception_type(
278-
core_exceptions.DeadlineExceeded,
279-
core_exceptions.ServiceUnavailable,
273+
core_exceptions.GoogleAPICallError,
280274
),
281275
deadline=600.0,
282276
),
@@ -470,5 +464,9 @@ def list_worker_pools(
470464
]:
471465
raise NotImplementedError()
472466

467+
@property
468+
def kind(self) -> str:
469+
raise NotImplementedError()
470+
473471

474472
__all__ = ("CloudBuildTransport",)

packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,5 +782,9 @@ def list_worker_pools(
782782
def close(self):
783783
self.grpc_channel.close()
784784

785+
@property
786+
def kind(self) -> str:
787+
return "grpc"
788+
785789

786790
__all__ = ("CloudBuildGrpcTransport",)

0 commit comments

Comments
 (0)