36
36
from google .api_core .client_options import ClientOptions
37
37
from google .api_core import exceptions as core_exceptions
38
38
from google .api_core import gapic_v1
39
- from google .api_core import retry as retries
39
+ from google .api_core import retry_async as retries
40
40
from google .auth import credentials as ga_credentials # type: ignore
41
41
from google .oauth2 import service_account # type: ignore
42
42
43
43
try :
44
- OptionalRetry = Union [retries .Retry , gapic_v1 .method ._MethodDefault ]
44
+ OptionalRetry = Union [retries .AsyncRetry , gapic_v1 .method ._MethodDefault ]
45
45
except AttributeError : # pragma: NO COVER
46
- OptionalRetry = Union [retries .Retry , object ] # type: ignore
46
+ OptionalRetry = Union [retries .AsyncRetry , object ] # type: ignore
47
47
48
48
from google .api import monitored_resource_pb2 # type: ignore
49
49
from google .cloud .logging_v2 .services .logging_service_v2 import pagers
@@ -278,7 +278,7 @@ async def sample_delete_log():
278
278
This corresponds to the ``log_name`` 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
@@ -305,7 +305,7 @@ async def sample_delete_log():
305
305
# and friendly error handling.
306
306
rpc = gapic_v1 .method_async .wrap_method (
307
307
self ._client ._transport .delete_log ,
308
- default_retry = retries .Retry (
308
+ default_retry = retries .AsyncRetry (
309
309
initial = 0.1 ,
310
310
maximum = 60.0 ,
311
311
multiplier = 1.3 ,
@@ -472,7 +472,7 @@ async def sample_write_log_entries():
472
472
This corresponds to the ``entries`` field
473
473
on the ``request`` instance; if ``request`` is provided, this
474
474
should not be set.
475
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
475
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
476
476
should be retried.
477
477
timeout (float): The timeout for this request.
478
478
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -510,7 +510,7 @@ async def sample_write_log_entries():
510
510
# and friendly error handling.
511
511
rpc = gapic_v1 .method_async .wrap_method (
512
512
self ._client ._transport .write_log_entries ,
513
- default_retry = retries .Retry (
513
+ default_retry = retries .AsyncRetry (
514
514
initial = 0.1 ,
515
515
maximum = 60.0 ,
516
516
multiplier = 1.3 ,
@@ -629,7 +629,7 @@ async def sample_list_log_entries():
629
629
This corresponds to the ``order_by`` field
630
630
on the ``request`` instance; if ``request`` is provided, this
631
631
should not be set.
632
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
632
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
633
633
should be retried.
634
634
timeout (float): The timeout for this request.
635
635
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -668,7 +668,7 @@ async def sample_list_log_entries():
668
668
# and friendly error handling.
669
669
rpc = gapic_v1 .method_async .wrap_method (
670
670
self ._client ._transport .list_log_entries ,
671
- default_retry = retries .Retry (
671
+ default_retry = retries .AsyncRetry (
672
672
initial = 0.1 ,
673
673
maximum = 60.0 ,
674
674
multiplier = 1.3 ,
@@ -746,7 +746,7 @@ async def sample_list_monitored_resource_descriptors():
746
746
request (Optional[Union[google.cloud.logging_v2.types.ListMonitoredResourceDescriptorsRequest, dict]]):
747
747
The request object. The parameters to
748
748
ListMonitoredResourceDescriptors
749
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
749
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
750
750
should be retried.
751
751
timeout (float): The timeout for this request.
752
752
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -768,7 +768,7 @@ async def sample_list_monitored_resource_descriptors():
768
768
# and friendly error handling.
769
769
rpc = gapic_v1 .method_async .wrap_method (
770
770
self ._client ._transport .list_monitored_resource_descriptors ,
771
- default_retry = retries .Retry (
771
+ default_retry = retries .AsyncRetry (
772
772
initial = 0.1 ,
773
773
maximum = 60.0 ,
774
774
multiplier = 1.3 ,
@@ -857,7 +857,7 @@ async def sample_list_logs():
857
857
This corresponds to the ``parent`` field
858
858
on the ``request`` instance; if ``request`` is provided, this
859
859
should not be set.
860
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
860
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
861
861
should be retried.
862
862
timeout (float): The timeout for this request.
863
863
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -893,7 +893,7 @@ async def sample_list_logs():
893
893
# and friendly error handling.
894
894
rpc = gapic_v1 .method_async .wrap_method (
895
895
self ._client ._transport .list_logs ,
896
- default_retry = retries .Retry (
896
+ default_retry = retries .AsyncRetry (
897
897
initial = 0.1 ,
898
898
maximum = 60.0 ,
899
899
multiplier = 1.3 ,
@@ -986,7 +986,7 @@ def request_generator():
986
986
Args:
987
987
requests (AsyncIterator[`google.cloud.logging_v2.types.TailLogEntriesRequest`]):
988
988
The request object AsyncIterator. The parameters to ``TailLogEntries``.
989
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
989
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
990
990
should be retried.
991
991
timeout (float): The timeout for this request.
992
992
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1001,7 +1001,7 @@ def request_generator():
1001
1001
# and friendly error handling.
1002
1002
rpc = gapic_v1 .method_async .wrap_method (
1003
1003
self ._client ._transport .tail_log_entries ,
1004
- default_retry = retries .Retry (
1004
+ default_retry = retries .AsyncRetry (
1005
1005
initial = 0.1 ,
1006
1006
maximum = 60.0 ,
1007
1007
multiplier = 1.3 ,
@@ -1041,7 +1041,7 @@ async def list_operations(
1041
1041
request (:class:`~.operations_pb2.ListOperationsRequest`):
1042
1042
The request object. Request message for
1043
1043
`ListOperations` method.
1044
- retry (google.api_core.retry.Retry ): Designation of what errors,
1044
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1045
1045
if any, should be retried.
1046
1046
timeout (float): The timeout for this request.
1047
1047
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1058,7 +1058,7 @@ async def list_operations(
1058
1058
1059
1059
# Wrap the RPC method; this adds retry and timeout information,
1060
1060
# and friendly error handling.
1061
- rpc = gapic_v1 .method .wrap_method (
1061
+ rpc = gapic_v1 .method_async .wrap_method (
1062
1062
self ._client ._transport .list_operations ,
1063
1063
default_timeout = None ,
1064
1064
client_info = DEFAULT_CLIENT_INFO ,
@@ -1095,7 +1095,7 @@ async def get_operation(
1095
1095
request (:class:`~.operations_pb2.GetOperationRequest`):
1096
1096
The request object. Request message for
1097
1097
`GetOperation` method.
1098
- retry (google.api_core.retry.Retry ): Designation of what errors,
1098
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1099
1099
if any, should be retried.
1100
1100
timeout (float): The timeout for this request.
1101
1101
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1112,7 +1112,7 @@ async def get_operation(
1112
1112
1113
1113
# Wrap the RPC method; this adds retry and timeout information,
1114
1114
# and friendly error handling.
1115
- rpc = gapic_v1 .method .wrap_method (
1115
+ rpc = gapic_v1 .method_async .wrap_method (
1116
1116
self ._client ._transport .get_operation ,
1117
1117
default_timeout = None ,
1118
1118
client_info = DEFAULT_CLIENT_INFO ,
@@ -1153,7 +1153,7 @@ async def cancel_operation(
1153
1153
request (:class:`~.operations_pb2.CancelOperationRequest`):
1154
1154
The request object. Request message for
1155
1155
`CancelOperation` method.
1156
- retry (google.api_core.retry.Retry ): Designation of what errors,
1156
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors,
1157
1157
if any, should be retried.
1158
1158
timeout (float): The timeout for this request.
1159
1159
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1169,7 +1169,7 @@ async def cancel_operation(
1169
1169
1170
1170
# Wrap the RPC method; this adds retry and timeout information,
1171
1171
# and friendly error handling.
1172
- rpc = gapic_v1 .method .wrap_method (
1172
+ rpc = gapic_v1 .method_async .wrap_method (
1173
1173
self ._client ._transport .cancel_operation ,
1174
1174
default_timeout = None ,
1175
1175
client_info = DEFAULT_CLIENT_INFO ,
0 commit comments