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 .orgpolicy_v2 .services .org_policy import pagers
46
46
from google .cloud .orgpolicy_v2 .types import constraint
@@ -288,7 +288,7 @@ async def sample_list_constraints():
288
288
This corresponds to the ``parent`` 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
@@ -325,7 +325,7 @@ async def sample_list_constraints():
325
325
# and friendly error handling.
326
326
rpc = gapic_v1 .method_async .wrap_method (
327
327
self ._client ._transport .list_constraints ,
328
- default_retry = retries .Retry (
328
+ default_retry = retries .AsyncRetry (
329
329
initial = 1.0 ,
330
330
maximum = 10.0 ,
331
331
multiplier = 1.3 ,
@@ -422,7 +422,7 @@ async def sample_list_policies():
422
422
This corresponds to the ``parent`` field
423
423
on the ``request`` instance; if ``request`` is provided, this
424
424
should not be set.
425
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
425
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
426
426
should be retried.
427
427
timeout (float): The timeout for this request.
428
428
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -460,7 +460,7 @@ async def sample_list_policies():
460
460
# and friendly error handling.
461
461
rpc = gapic_v1 .method_async .wrap_method (
462
462
self ._client ._transport .list_policies ,
463
- default_retry = retries .Retry (
463
+ default_retry = retries .AsyncRetry (
464
464
initial = 1.0 ,
465
465
maximum = 10.0 ,
466
466
multiplier = 1.3 ,
@@ -552,7 +552,7 @@ async def sample_get_policy():
552
552
This corresponds to the ``name`` field
553
553
on the ``request`` instance; if ``request`` is provided, this
554
554
should not be set.
555
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
555
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
556
556
should be retried.
557
557
timeout (float): The timeout for this request.
558
558
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -585,7 +585,7 @@ async def sample_get_policy():
585
585
# and friendly error handling.
586
586
rpc = gapic_v1 .method_async .wrap_method (
587
587
self ._client ._transport .get_policy ,
588
- default_retry = retries .Retry (
588
+ default_retry = retries .AsyncRetry (
589
589
initial = 1.0 ,
590
590
maximum = 10.0 ,
591
591
multiplier = 1.3 ,
@@ -670,7 +670,7 @@ async def sample_get_effective_policy():
670
670
This corresponds to the ``name`` field
671
671
on the ``request`` instance; if ``request`` is provided, this
672
672
should not be set.
673
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
673
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
674
674
should be retried.
675
675
timeout (float): The timeout for this request.
676
676
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -703,7 +703,7 @@ async def sample_get_effective_policy():
703
703
# and friendly error handling.
704
704
rpc = gapic_v1 .method_async .wrap_method (
705
705
self ._client ._transport .get_effective_policy ,
706
- default_retry = retries .Retry (
706
+ default_retry = retries .AsyncRetry (
707
707
initial = 1.0 ,
708
708
maximum = 10.0 ,
709
709
multiplier = 1.3 ,
@@ -800,7 +800,7 @@ async def sample_create_policy():
800
800
This corresponds to the ``policy`` field
801
801
on the ``request`` instance; if ``request`` is provided, this
802
802
should not be set.
803
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
803
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
804
804
should be retried.
805
805
timeout (float): The timeout for this request.
806
806
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -835,7 +835,7 @@ async def sample_create_policy():
835
835
# and friendly error handling.
836
836
rpc = gapic_v1 .method_async .wrap_method (
837
837
self ._client ._transport .create_policy ,
838
- default_retry = retries .Retry (
838
+ default_retry = retries .AsyncRetry (
839
839
initial = 1.0 ,
840
840
maximum = 10.0 ,
841
841
multiplier = 1.3 ,
@@ -921,7 +921,7 @@ async def sample_update_policy():
921
921
This corresponds to the ``policy`` field
922
922
on the ``request`` instance; if ``request`` is provided, this
923
923
should not be set.
924
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
924
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
925
925
should be retried.
926
926
timeout (float): The timeout for this request.
927
927
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -954,7 +954,7 @@ async def sample_update_policy():
954
954
# and friendly error handling.
955
955
rpc = gapic_v1 .method_async .wrap_method (
956
956
self ._client ._transport .update_policy ,
957
- default_retry = retries .Retry (
957
+ default_retry = retries .AsyncRetry (
958
958
initial = 1.0 ,
959
959
maximum = 10.0 ,
960
960
multiplier = 1.3 ,
@@ -1037,7 +1037,7 @@ async def sample_delete_policy():
1037
1037
This corresponds to the ``name`` field
1038
1038
on the ``request`` instance; if ``request`` is provided, this
1039
1039
should not be set.
1040
- retry (google.api_core.retry.Retry ): Designation of what errors, if any,
1040
+ retry (google.api_core.retry_async.AsyncRetry ): Designation of what errors, if any,
1041
1041
should be retried.
1042
1042
timeout (float): The timeout for this request.
1043
1043
metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1064,7 +1064,7 @@ async def sample_delete_policy():
1064
1064
# and friendly error handling.
1065
1065
rpc = gapic_v1 .method_async .wrap_method (
1066
1066
self ._client ._transport .delete_policy ,
1067
- default_retry = retries .Retry (
1067
+ default_retry = retries .AsyncRetry (
1068
1068
initial = 1.0 ,
1069
1069
maximum = 10.0 ,
1070
1070
multiplier = 1.3 ,
0 commit comments