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 # type: ignore
46
46
from google .api_core import operation_async # type: ignore
@@ -288,7 +288,7 @@ async def sample_create_topic():
288
288
This corresponds to the ``topic_id`` field
289
289
on the ``request`` instance; if ``request`` is provided, this
290
290
should not be set.
291
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
291
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
292
292
should be retried.
293
293
timeout (float): The timeout for this request.
294
294
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -391,7 +391,7 @@ async def sample_get_topic():
391
391
This corresponds to the ``name`` field
392
392
on the ``request`` instance; if ``request`` is provided, this
393
393
should not be set.
394
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
394
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
395
395
should be retried.
396
396
timeout (float): The timeout for this request.
397
397
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -491,7 +491,7 @@ async def sample_get_topic_partitions():
491
491
This corresponds to the ``name`` field
492
492
on the ``request`` instance; if ``request`` is provided, this
493
493
should not be set.
494
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
494
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
495
495
should be retried.
496
496
timeout (float): The timeout for this request.
497
497
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -592,7 +592,7 @@ async def sample_list_topics():
592
592
This corresponds to the ``parent`` field
593
593
on the ``request`` instance; if ``request`` is provided, this
594
594
should not be set.
595
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
595
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
596
596
should be retried.
597
597
timeout (float): The timeout for this request.
598
598
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -712,7 +712,7 @@ async def sample_update_topic():
712
712
This corresponds to the ``update_mask`` field
713
713
on the ``request`` instance; if ``request`` is provided, this
714
714
should not be set.
715
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
715
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
716
716
should be retried.
717
717
timeout (float): The timeout for this request.
718
718
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -812,7 +812,7 @@ async def sample_delete_topic():
812
812
This corresponds to the ``name`` field
813
813
on the ``request`` instance; if ``request`` is provided, this
814
814
should not be set.
815
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
815
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
816
816
should be retried.
817
817
timeout (float): The timeout for this request.
818
818
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -906,7 +906,7 @@ async def sample_list_topic_subscriptions():
906
906
This corresponds to the ``name`` field
907
907
on the ``request`` instance; if ``request`` is provided, this
908
908
should not be set.
909
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
909
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
910
910
should be retried.
911
911
timeout (float): The timeout for this request.
912
912
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1039,7 +1039,7 @@ async def sample_create_subscription():
1039
1039
This corresponds to the ``subscription_id`` field
1040
1040
on the ``request`` instance; if ``request`` is provided, this
1041
1041
should not be set.
1042
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1042
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1043
1043
should be retried.
1044
1044
timeout (float): The timeout for this request.
1045
1045
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1145,7 +1145,7 @@ async def sample_get_subscription():
1145
1145
This corresponds to the ``name`` field
1146
1146
on the ``request`` instance; if ``request`` is provided, this
1147
1147
should not be set.
1148
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1148
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1149
1149
should be retried.
1150
1150
timeout (float): The timeout for this request.
1151
1151
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1249,7 +1249,7 @@ async def sample_list_subscriptions():
1249
1249
This corresponds to the ``parent`` field
1250
1250
on the ``request`` instance; if ``request`` is provided, this
1251
1251
should not be set.
1252
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1252
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1253
1253
should be retried.
1254
1254
timeout (float): The timeout for this request.
1255
1255
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1369,7 +1369,7 @@ async def sample_update_subscription():
1369
1369
This corresponds to the ``update_mask`` field
1370
1370
on the ``request`` instance; if ``request`` is provided, this
1371
1371
should not be set.
1372
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1372
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1373
1373
should be retried.
1374
1374
timeout (float): The timeout for this request.
1375
1375
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1471,7 +1471,7 @@ async def sample_delete_subscription():
1471
1471
This corresponds to the ``name`` field
1472
1472
on the ``request`` instance; if ``request`` is provided, this
1473
1473
should not be set.
1474
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1474
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1475
1475
should be retried.
1476
1476
timeout (float): The timeout for this request.
1477
1477
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1586,7 +1586,7 @@ async def sample_seek_subscription():
1586
1586
Args:
1587
1587
request (Optional[Union[google.cloud.pubsublite_v1.types.SeekSubscriptionRequest, dict]]):
1588
1588
The request object. Request for SeekSubscription.
1589
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1589
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1590
1590
should be retried.
1591
1591
timeout (float): The timeout for this request.
1592
1592
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1704,7 +1704,7 @@ async def sample_create_reservation():
1704
1704
This corresponds to the ``reservation_id`` field
1705
1705
on the ``request`` instance; if ``request`` is provided, this
1706
1706
should not be set.
1707
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1707
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1708
1708
should be retried.
1709
1709
timeout (float): The timeout for this request.
1710
1710
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1810,7 +1810,7 @@ async def sample_get_reservation():
1810
1810
This corresponds to the ``name`` field
1811
1811
on the ``request`` instance; if ``request`` is provided, this
1812
1812
should not be set.
1813
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1813
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1814
1814
should be retried.
1815
1815
timeout (float): The timeout for this request.
1816
1816
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1914,7 +1914,7 @@ async def sample_list_reservations():
1914
1914
This corresponds to the ``parent`` field
1915
1915
on the ``request`` instance; if ``request`` is provided, this
1916
1916
should not be set.
1917
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1917
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1918
1918
should be retried.
1919
1919
timeout (float): The timeout for this request.
1920
1920
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2034,7 +2034,7 @@ async def sample_update_reservation():
2034
2034
This corresponds to the ``update_mask`` field
2035
2035
on the ``request`` instance; if ``request`` is provided, this
2036
2036
should not be set.
2037
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
2037
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
2038
2038
should be retried.
2039
2039
timeout (float): The timeout for this request.
2040
2040
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2137,7 +2137,7 @@ async def sample_delete_reservation():
2137
2137
This corresponds to the ``name`` field
2138
2138
on the ``request`` instance; if ``request`` is provided, this
2139
2139
should not be set.
2140
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
2140
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
2141
2141
should be retried.
2142
2142
timeout (float): The timeout for this request.
2143
2143
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2232,7 +2232,7 @@ async def sample_list_reservation_topics():
2232
2232
This corresponds to the ``name`` field
2233
2233
on the ``request`` instance; if ``request`` is provided, this
2234
2234
should not be set.
2235
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
2235
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
2236
2236
should be retried.
2237
2237
timeout (float): The timeout for this request.
2238
2238
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2312,7 +2312,7 @@ async def list_operations(
2312
2312
request (:class:`~.operations_pb2.ListOperationsRequest`):
2313
2313
The request object. Request message for
2314
2314
`ListOperations` method.
2315
- retry (google.api_core.retry.Retry ): Designation of what errors,
2315
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
2316
2316
if any, should be retried.
2317
2317
timeout (float): The timeout for this request.
2318
2318
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2329,7 +2329,7 @@ async def list_operations(
2329
2329
2330
2330
# Wrap the RPC method; this adds retry and timeout information,
2331
2331
# and friendly error handling.
2332
- rpc = gapic_v1 .method .wrap_method (
2332
+ rpc = gapic_v1 .method_async .wrap_method (
2333
2333
self ._client ._transport .list_operations ,
2334
2334
default_timeout = None ,
2335
2335
client_info = DEFAULT_CLIENT_INFO ,
@@ -2366,7 +2366,7 @@ async def get_operation(
2366
2366
request (:class:`~.operations_pb2.GetOperationRequest`):
2367
2367
The request object. Request message for
2368
2368
`GetOperation` method.
2369
- retry (google.api_core.retry.Retry ): Designation of what errors,
2369
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
2370
2370
if any, should be retried.
2371
2371
timeout (float): The timeout for this request.
2372
2372
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2383,7 +2383,7 @@ async def get_operation(
2383
2383
2384
2384
# Wrap the RPC method; this adds retry and timeout information,
2385
2385
# and friendly error handling.
2386
- rpc = gapic_v1 .method .wrap_method (
2386
+ rpc = gapic_v1 .method_async .wrap_method (
2387
2387
self ._client ._transport .get_operation ,
2388
2388
default_timeout = None ,
2389
2389
client_info = DEFAULT_CLIENT_INFO ,
@@ -2425,7 +2425,7 @@ async def delete_operation(
2425
2425
request (:class:`~.operations_pb2.DeleteOperationRequest`):
2426
2426
The request object. Request message for
2427
2427
`DeleteOperation` method.
2428
- retry (google.api_core.retry.Retry ): Designation of what errors,
2428
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
2429
2429
if any, should be retried.
2430
2430
timeout (float): The timeout for this request.
2431
2431
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2441,7 +2441,7 @@ async def delete_operation(
2441
2441
2442
2442
# Wrap the RPC method; this adds retry and timeout information,
2443
2443
# and friendly error handling.
2444
- rpc = gapic_v1 .method .wrap_method (
2444
+ rpc = gapic_v1 .method_async .wrap_method (
2445
2445
self ._client ._transport .delete_operation ,
2446
2446
default_timeout = None ,
2447
2447
client_info = DEFAULT_CLIENT_INFO ,
@@ -2479,7 +2479,7 @@ async def cancel_operation(
2479
2479
request (:class:`~.operations_pb2.CancelOperationRequest`):
2480
2480
The request object. Request message for
2481
2481
`CancelOperation` method.
2482
- retry (google.api_core.retry.Retry ): Designation of what errors,
2482
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
2483
2483
if any, should be retried.
2484
2484
timeout (float): The timeout for this request.
2485
2485
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -2495,7 +2495,7 @@ async def cancel_operation(
2495
2495
2496
2496
# Wrap the RPC method; this adds retry and timeout information,
2497
2497
# and friendly error handling.
2498
- rpc = gapic_v1 .method .wrap_method (
2498
+ rpc = gapic_v1 .method_async .wrap_method (
2499
2499
self ._client ._transport .cancel_operation ,
2500
2500
default_timeout = None ,
2501
2501
client_info = DEFAULT_CLIENT_INFO ,
0 commit comments