33
33
from google .api_core .client_options import ClientOptions
34
34
from google .api_core import exceptions as core_exceptions
35
35
from google .api_core import gapic_v1
36
- from google .api_core import retry as retries
36
+ from google .api_core import retry_async as retries
37
37
from google .auth import credentials as ga_credentials # type: ignore
38
38
from google .oauth2 import service_account # type: ignore
39
39
40
40
try :
41
- OptionalRetry = Union [retries .Retry , gapic_v1 .method ._MethodDefault ]
41
+ OptionalRetry = Union [retries .AsyncRetry , gapic_v1 .method ._MethodDefault ]
42
42
except AttributeError : # pragma: NO COVER
43
- OptionalRetry = Union [retries .Retry , object ] # type: ignore
43
+ OptionalRetry = Union [retries .AsyncRetry , object ] # type: ignore
44
44
45
45
from google .api_core import operation as gac_operation # type: ignore
46
46
from google .api_core import operation_async # type: ignore
@@ -323,7 +323,7 @@ async def sample_create_endpoint():
323
323
This corresponds to the ``endpoint_id`` field
324
324
on the ``request`` instance; if ``request`` is provided, this
325
325
should not be set.
326
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
326
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
327
327
should be retried.
328
328
timeout (float): The timeout for this request.
329
329
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -439,7 +439,7 @@ async def sample_get_endpoint():
439
439
This corresponds to the ``name`` field
440
440
on the ``request`` instance; if ``request`` is provided, this
441
441
should not be set.
442
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
442
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
443
443
should be retried.
444
444
timeout (float): The timeout for this request.
445
445
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -544,7 +544,7 @@ async def sample_list_endpoints():
544
544
This corresponds to the ``parent`` field
545
545
on the ``request`` instance; if ``request`` is provided, this
546
546
should not be set.
547
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
547
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
548
548
should be retried.
549
549
timeout (float): The timeout for this request.
550
550
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -669,7 +669,7 @@ async def sample_update_endpoint():
669
669
This corresponds to the ``update_mask`` field
670
670
on the ``request`` instance; if ``request`` is provided, this
671
671
should not be set.
672
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
672
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
673
673
should be retried.
674
674
timeout (float): The timeout for this request.
675
675
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -781,7 +781,7 @@ async def sample_delete_endpoint():
781
781
This corresponds to the ``name`` field
782
782
on the ``request`` instance; if ``request`` is provided, this
783
783
should not be set.
784
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
784
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
785
785
should be retried.
786
786
timeout (float): The timeout for this request.
787
787
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -945,7 +945,7 @@ async def sample_deploy_model():
945
945
This corresponds to the ``traffic_split`` field
946
946
on the ``request`` instance; if ``request`` is provided, this
947
947
should not be set.
948
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
948
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
949
949
should be retried.
950
950
timeout (float): The timeout for this request.
951
951
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1093,7 +1093,7 @@ async def sample_undeploy_model():
1093
1093
This corresponds to the ``traffic_split`` field
1094
1094
on the ``request`` instance; if ``request`` is provided, this
1095
1095
should not be set.
1096
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1096
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1097
1097
should be retried.
1098
1098
timeout (float): The timeout for this request.
1099
1099
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1253,7 +1253,7 @@ async def sample_mutate_deployed_model():
1253
1253
This corresponds to the ``update_mask`` field
1254
1254
on the ``request`` instance; if ``request`` is provided, this
1255
1255
should not be set.
1256
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1256
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1257
1257
should be retried.
1258
1258
timeout (float): The timeout for this request.
1259
1259
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1335,7 +1335,7 @@ async def list_operations(
1335
1335
request (:class:`~.operations_pb2.ListOperationsRequest`):
1336
1336
The request object. Request message for
1337
1337
`ListOperations` method.
1338
- retry (google.api_core.retry.Retry ): Designation of what errors,
1338
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1339
1339
if any, should be retried.
1340
1340
timeout (float): The timeout for this request.
1341
1341
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1352,7 +1352,7 @@ async def list_operations(
1352
1352
1353
1353
# Wrap the RPC method; this adds retry and timeout information,
1354
1354
# and friendly error handling.
1355
- rpc = gapic_v1 .method .wrap_method (
1355
+ rpc = gapic_v1 .method_async .wrap_method (
1356
1356
self ._client ._transport .list_operations ,
1357
1357
default_timeout = None ,
1358
1358
client_info = DEFAULT_CLIENT_INFO ,
@@ -1389,7 +1389,7 @@ async def get_operation(
1389
1389
request (:class:`~.operations_pb2.GetOperationRequest`):
1390
1390
The request object. Request message for
1391
1391
`GetOperation` method.
1392
- retry (google.api_core.retry.Retry ): Designation of what errors,
1392
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1393
1393
if any, should be retried.
1394
1394
timeout (float): The timeout for this request.
1395
1395
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1406,7 +1406,7 @@ async def get_operation(
1406
1406
1407
1407
# Wrap the RPC method; this adds retry and timeout information,
1408
1408
# and friendly error handling.
1409
- rpc = gapic_v1 .method .wrap_method (
1409
+ rpc = gapic_v1 .method_async .wrap_method (
1410
1410
self ._client ._transport .get_operation ,
1411
1411
default_timeout = None ,
1412
1412
client_info = DEFAULT_CLIENT_INFO ,
@@ -1448,7 +1448,7 @@ async def delete_operation(
1448
1448
request (:class:`~.operations_pb2.DeleteOperationRequest`):
1449
1449
The request object. Request message for
1450
1450
`DeleteOperation` method.
1451
- retry (google.api_core.retry.Retry ): Designation of what errors,
1451
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1452
1452
if any, should be retried.
1453
1453
timeout (float): The timeout for this request.
1454
1454
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1464,7 +1464,7 @@ async def delete_operation(
1464
1464
1465
1465
# Wrap the RPC method; this adds retry and timeout information,
1466
1466
# and friendly error handling.
1467
- rpc = gapic_v1 .method .wrap_method (
1467
+ rpc = gapic_v1 .method_async .wrap_method (
1468
1468
self ._client ._transport .delete_operation ,
1469
1469
default_timeout = None ,
1470
1470
client_info = DEFAULT_CLIENT_INFO ,
@@ -1502,7 +1502,7 @@ async def cancel_operation(
1502
1502
request (:class:`~.operations_pb2.CancelOperationRequest`):
1503
1503
The request object. Request message for
1504
1504
`CancelOperation` method.
1505
- retry (google.api_core.retry.Retry ): Designation of what errors,
1505
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1506
1506
if any, should be retried.
1507
1507
timeout (float): The timeout for this request.
1508
1508
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1518,7 +1518,7 @@ async def cancel_operation(
1518
1518
1519
1519
# Wrap the RPC method; this adds retry and timeout information,
1520
1520
# and friendly error handling.
1521
- rpc = gapic_v1 .method .wrap_method (
1521
+ rpc = gapic_v1 .method_async .wrap_method (
1522
1522
self ._client ._transport .cancel_operation ,
1523
1523
default_timeout = None ,
1524
1524
client_info = DEFAULT_CLIENT_INFO ,
@@ -1558,7 +1558,7 @@ async def wait_operation(
1558
1558
request (:class:`~.operations_pb2.WaitOperationRequest`):
1559
1559
The request object. Request message for
1560
1560
`WaitOperation` method.
1561
- retry (google.api_core.retry.Retry ): Designation of what errors,
1561
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1562
1562
if any, should be retried.
1563
1563
timeout (float): The timeout for this request.
1564
1564
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1575,7 +1575,7 @@ async def wait_operation(
1575
1575
1576
1576
# Wrap the RPC method; this adds retry and timeout information,
1577
1577
# and friendly error handling.
1578
- rpc = gapic_v1 .method .wrap_method (
1578
+ rpc = gapic_v1 .method_async .wrap_method (
1579
1579
self ._client ._transport .wait_operation ,
1580
1580
default_timeout = None ,
1581
1581
client_info = DEFAULT_CLIENT_INFO ,
@@ -1614,7 +1614,7 @@ async def set_iam_policy(
1614
1614
request (:class:`~.iam_policy_pb2.SetIamPolicyRequest`):
1615
1615
The request object. Request message for `SetIamPolicy`
1616
1616
method.
1617
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1617
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1618
1618
should be retried.
1619
1619
timeout (float): The timeout for this request.
1620
1620
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1695,7 +1695,7 @@ async def set_iam_policy(
1695
1695
1696
1696
# Wrap the RPC method; this adds retry and timeout information,
1697
1697
# and friendly error handling.
1698
- rpc = gapic_v1 .method .wrap_method (
1698
+ rpc = gapic_v1 .method_async .wrap_method (
1699
1699
self ._client ._transport .set_iam_policy ,
1700
1700
default_timeout = None ,
1701
1701
client_info = DEFAULT_CLIENT_INFO ,
@@ -1735,7 +1735,7 @@ async def get_iam_policy(
1735
1735
request (:class:`~.iam_policy_pb2.GetIamPolicyRequest`):
1736
1736
The request object. Request message for `GetIamPolicy`
1737
1737
method.
1738
- retry (google.api_core.retry.Retry ): Designation of what errors, if
1738
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if
1739
1739
any, should be retried.
1740
1740
timeout (float): The timeout for this request.
1741
1741
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1816,7 +1816,7 @@ async def get_iam_policy(
1816
1816
1817
1817
# Wrap the RPC method; this adds retry and timeout information,
1818
1818
# and friendly error handling.
1819
- rpc = gapic_v1 .method .wrap_method (
1819
+ rpc = gapic_v1 .method_async .wrap_method (
1820
1820
self ._client ._transport .get_iam_policy ,
1821
1821
default_timeout = None ,
1822
1822
client_info = DEFAULT_CLIENT_INFO ,
@@ -1857,7 +1857,7 @@ async def test_iam_permissions(
1857
1857
request (:class:`~.iam_policy_pb2.TestIamPermissionsRequest`):
1858
1858
The request object. Request message for
1859
1859
`TestIamPermissions` method.
1860
- retry (google.api_core.retry.Retry ): Designation of what errors,
1860
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1861
1861
if any, should be retried.
1862
1862
timeout (float): The timeout for this request.
1863
1863
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1875,7 +1875,7 @@ async def test_iam_permissions(
1875
1875
1876
1876
# Wrap the RPC method; this adds retry and timeout information,
1877
1877
# and friendly error handling.
1878
- rpc = gapic_v1 .method .wrap_method (
1878
+ rpc = gapic_v1 .method_async .wrap_method (
1879
1879
self ._client ._transport .test_iam_permissions ,
1880
1880
default_timeout = None ,
1881
1881
client_info = DEFAULT_CLIENT_INFO ,
@@ -1912,7 +1912,7 @@ async def get_location(
1912
1912
request (:class:`~.location_pb2.GetLocationRequest`):
1913
1913
The request object. Request message for
1914
1914
`GetLocation` method.
1915
- retry (google.api_core.retry.Retry ): Designation of what errors,
1915
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1916
1916
if any, should be retried.
1917
1917
timeout (float): The timeout for this request.
1918
1918
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1929,7 +1929,7 @@ async def get_location(
1929
1929
1930
1930
# Wrap the RPC method; this adds retry and timeout information,
1931
1931
# and friendly error handling.
1932
- rpc = gapic_v1 .method .wrap_method (
1932
+ rpc = gapic_v1 .method_async .wrap_method (
1933
1933
self ._client ._transport .get_location ,
1934
1934
default_timeout = None ,
1935
1935
client_info = DEFAULT_CLIENT_INFO ,
@@ -1966,7 +1966,7 @@ async def list_locations(
1966
1966
request (:class:`~.location_pb2.ListLocationsRequest`):
1967
1967
The request object. Request message for
1968
1968
`ListLocations` method.
1969
- retry (google.api_core.retry.Retry ): Designation of what errors,
1969
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1970
1970
if any, should be retried.
1971
1971
timeout (float): The timeout for this request.
1972
1972
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1983,7 +1983,7 @@ async def list_locations(
1983
1983
1984
1984
# Wrap the RPC method; this adds retry and timeout information,
1985
1985
# and friendly error handling.
1986
- rpc = gapic_v1 .method .wrap_method (
1986
+ rpc = gapic_v1 .method_async .wrap_method (
1987
1987
self ._client ._transport .list_locations ,
1988
1988
default_timeout = None ,
1989
1989
client_info = DEFAULT_CLIENT_INFO ,
0 commit comments