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 .cloud .datastore_v1 .types import aggregation_result
46
46
from google .cloud .datastore_v1 .types import datastore
@@ -278,7 +278,7 @@ async def sample_lookup():
278
278
This corresponds to the ``keys`` field
279
279
on the ``request`` instance; if ``request`` is provided, this
280
280
should not be set.
281
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
281
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
282
282
should be retried.
283
283
timeout (float): The timeout for this request.
284
284
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -315,7 +315,7 @@ async def sample_lookup():
315
315
# and friendly error handling.
316
316
rpc = gapic_v1 .method_async .wrap_method (
317
317
self ._client ._transport .lookup ,
318
- default_retry = retries .Retry (
318
+ default_retry = retries .AsyncRetry (
319
319
initial = 0.1 ,
320
320
maximum = 60.0 ,
321
321
multiplier = 1.3 ,
@@ -388,7 +388,7 @@ async def sample_run_query():
388
388
request (Optional[Union[google.cloud.datastore_v1.types.RunQueryRequest, dict]]):
389
389
The request object. The request for
390
390
[Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
391
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
391
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
392
392
should be retried.
393
393
timeout (float): The timeout for this request.
394
394
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -407,7 +407,7 @@ async def sample_run_query():
407
407
# and friendly error handling.
408
408
rpc = gapic_v1 .method_async .wrap_method (
409
409
self ._client ._transport .run_query ,
410
- default_retry = retries .Retry (
410
+ default_retry = retries .AsyncRetry (
411
411
initial = 0.1 ,
412
412
maximum = 60.0 ,
413
413
multiplier = 1.3 ,
@@ -480,7 +480,7 @@ async def sample_run_aggregation_query():
480
480
request (Optional[Union[google.cloud.datastore_v1.types.RunAggregationQueryRequest, dict]]):
481
481
The request object. The request for
482
482
[Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
483
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
483
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
484
484
should be retried.
485
485
timeout (float): The timeout for this request.
486
486
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -499,7 +499,7 @@ async def sample_run_aggregation_query():
499
499
# and friendly error handling.
500
500
rpc = gapic_v1 .method_async .wrap_method (
501
501
self ._client ._transport .run_aggregation_query ,
502
- default_retry = retries .Retry (
502
+ default_retry = retries .AsyncRetry (
503
503
initial = 0.1 ,
504
504
maximum = 60.0 ,
505
505
multiplier = 1.3 ,
@@ -580,7 +580,7 @@ async def sample_begin_transaction():
580
580
This corresponds to the ``project_id`` field
581
581
on the ``request`` instance; if ``request`` is provided, this
582
582
should not be set.
583
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
583
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
584
584
should be retried.
585
585
timeout (float): The timeout for this request.
586
586
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -724,7 +724,7 @@ async def sample_commit():
724
724
This corresponds to the ``mutations`` field
725
725
on the ``request`` instance; if ``request`` is provided, this
726
726
should not be set.
727
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
727
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
728
728
should be retried.
729
729
timeout (float): The timeout for this request.
730
730
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -844,7 +844,7 @@ async def sample_rollback():
844
844
This corresponds to the ``transaction`` field
845
845
on the ``request`` instance; if ``request`` is provided, this
846
846
should not be set.
847
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
847
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
848
848
should be retried.
849
849
timeout (float): The timeout for this request.
850
850
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -962,7 +962,7 @@ async def sample_allocate_ids():
962
962
This corresponds to the ``keys`` field
963
963
on the ``request`` instance; if ``request`` is provided, this
964
964
should not be set.
965
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
965
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
966
966
should be retried.
967
967
timeout (float): The timeout for this request.
968
968
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1078,7 +1078,7 @@ async def sample_reserve_ids():
1078
1078
This corresponds to the ``keys`` field
1079
1079
on the ``request`` instance; if ``request`` is provided, this
1080
1080
should not be set.
1081
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1081
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1082
1082
should be retried.
1083
1083
timeout (float): The timeout for this request.
1084
1084
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1113,7 +1113,7 @@ async def sample_reserve_ids():
1113
1113
# and friendly error handling.
1114
1114
rpc = gapic_v1 .method_async .wrap_method (
1115
1115
self ._client ._transport .reserve_ids ,
1116
- default_retry = retries .Retry (
1116
+ default_retry = retries .AsyncRetry (
1117
1117
initial = 0.1 ,
1118
1118
maximum = 60.0 ,
1119
1119
multiplier = 1.3 ,
@@ -1160,7 +1160,7 @@ async def list_operations(
1160
1160
request (:class:`~.operations_pb2.ListOperationsRequest`):
1161
1161
The request object. Request message for
1162
1162
`ListOperations` method.
1163
- retry (google.api_core.retry.Retry ): Designation of what errors,
1163
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1164
1164
if any, should be retried.
1165
1165
timeout (float): The timeout for this request.
1166
1166
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1177,7 +1177,7 @@ async def list_operations(
1177
1177
1178
1178
# Wrap the RPC method; this adds retry and timeout information,
1179
1179
# and friendly error handling.
1180
- rpc = gapic_v1 .method .wrap_method (
1180
+ rpc = gapic_v1 .method_async .wrap_method (
1181
1181
self ._client ._transport .list_operations ,
1182
1182
default_timeout = None ,
1183
1183
client_info = DEFAULT_CLIENT_INFO ,
@@ -1214,7 +1214,7 @@ async def get_operation(
1214
1214
request (:class:`~.operations_pb2.GetOperationRequest`):
1215
1215
The request object. Request message for
1216
1216
`GetOperation` method.
1217
- retry (google.api_core.retry.Retry ): Designation of what errors,
1217
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1218
1218
if any, should be retried.
1219
1219
timeout (float): The timeout for this request.
1220
1220
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1231,7 +1231,7 @@ async def get_operation(
1231
1231
1232
1232
# Wrap the RPC method; this adds retry and timeout information,
1233
1233
# and friendly error handling.
1234
- rpc = gapic_v1 .method .wrap_method (
1234
+ rpc = gapic_v1 .method_async .wrap_method (
1235
1235
self ._client ._transport .get_operation ,
1236
1236
default_timeout = None ,
1237
1237
client_info = DEFAULT_CLIENT_INFO ,
@@ -1273,7 +1273,7 @@ async def delete_operation(
1273
1273
request (:class:`~.operations_pb2.DeleteOperationRequest`):
1274
1274
The request object. Request message for
1275
1275
`DeleteOperation` method.
1276
- retry (google.api_core.retry.Retry ): Designation of what errors,
1276
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1277
1277
if any, should be retried.
1278
1278
timeout (float): The timeout for this request.
1279
1279
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1289,7 +1289,7 @@ async def delete_operation(
1289
1289
1290
1290
# Wrap the RPC method; this adds retry and timeout information,
1291
1291
# and friendly error handling.
1292
- rpc = gapic_v1 .method .wrap_method (
1292
+ rpc = gapic_v1 .method_async .wrap_method (
1293
1293
self ._client ._transport .delete_operation ,
1294
1294
default_timeout = None ,
1295
1295
client_info = DEFAULT_CLIENT_INFO ,
@@ -1327,7 +1327,7 @@ async def cancel_operation(
1327
1327
request (:class:`~.operations_pb2.CancelOperationRequest`):
1328
1328
The request object. Request message for
1329
1329
`CancelOperation` method.
1330
- retry (google.api_core.retry.Retry ): Designation of what errors,
1330
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1331
1331
if any, should be retried.
1332
1332
timeout (float): The timeout for this request.
1333
1333
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1343,7 +1343,7 @@ async def cancel_operation(
1343
1343
1344
1344
# Wrap the RPC method; this adds retry and timeout information,
1345
1345
# and friendly error handling.
1346
- rpc = gapic_v1 .method .wrap_method (
1346
+ rpc = gapic_v1 .method_async .wrap_method (
1347
1347
self ._client ._transport .cancel_operation ,
1348
1348
default_timeout = None ,
1349
1349
client_info = DEFAULT_CLIENT_INFO ,
0 commit comments