3333from google .api_core .client_options import ClientOptions
3434from google .api_core import exceptions as core_exceptions
3535from 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
3737from google .auth import credentials as ga_credentials # type: ignore
3838from google .oauth2 import service_account # type: ignore
3939
4040try :
41- OptionalRetry = Union [retries .Retry , gapic_v1 .method ._MethodDefault ]
41+ OptionalRetry = Union [retries .AsyncRetry , gapic_v1 .method ._MethodDefault ]
4242except AttributeError : # pragma: NO COVER
43- OptionalRetry = Union [retries .Retry , object ] # type: ignore
43+ OptionalRetry = Union [retries .AsyncRetry , object ] # type: ignore
4444
4545from google .cloud .orgpolicy_v2 .services .org_policy import pagers
4646from google .cloud .orgpolicy_v2 .types import constraint
@@ -288,7 +288,7 @@ async def sample_list_constraints():
288288 This corresponds to the ``parent`` field
289289 on the ``request`` instance; if ``request`` is provided, this
290290 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,
292292 should be retried.
293293 timeout (float): The timeout for this request.
294294 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -325,7 +325,7 @@ async def sample_list_constraints():
325325 # and friendly error handling.
326326 rpc = gapic_v1 .method_async .wrap_method (
327327 self ._client ._transport .list_constraints ,
328- default_retry = retries .Retry (
328+ default_retry = retries .AsyncRetry (
329329 initial = 1.0 ,
330330 maximum = 10.0 ,
331331 multiplier = 1.3 ,
@@ -422,7 +422,7 @@ async def sample_list_policies():
422422 This corresponds to the ``parent`` field
423423 on the ``request`` instance; if ``request`` is provided, this
424424 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,
426426 should be retried.
427427 timeout (float): The timeout for this request.
428428 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -460,7 +460,7 @@ async def sample_list_policies():
460460 # and friendly error handling.
461461 rpc = gapic_v1 .method_async .wrap_method (
462462 self ._client ._transport .list_policies ,
463- default_retry = retries .Retry (
463+ default_retry = retries .AsyncRetry (
464464 initial = 1.0 ,
465465 maximum = 10.0 ,
466466 multiplier = 1.3 ,
@@ -552,7 +552,7 @@ async def sample_get_policy():
552552 This corresponds to the ``name`` field
553553 on the ``request`` instance; if ``request`` is provided, this
554554 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,
556556 should be retried.
557557 timeout (float): The timeout for this request.
558558 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -585,7 +585,7 @@ async def sample_get_policy():
585585 # and friendly error handling.
586586 rpc = gapic_v1 .method_async .wrap_method (
587587 self ._client ._transport .get_policy ,
588- default_retry = retries .Retry (
588+ default_retry = retries .AsyncRetry (
589589 initial = 1.0 ,
590590 maximum = 10.0 ,
591591 multiplier = 1.3 ,
@@ -670,7 +670,7 @@ async def sample_get_effective_policy():
670670 This corresponds to the ``name`` field
671671 on the ``request`` instance; if ``request`` is provided, this
672672 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,
674674 should be retried.
675675 timeout (float): The timeout for this request.
676676 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -703,7 +703,7 @@ async def sample_get_effective_policy():
703703 # and friendly error handling.
704704 rpc = gapic_v1 .method_async .wrap_method (
705705 self ._client ._transport .get_effective_policy ,
706- default_retry = retries .Retry (
706+ default_retry = retries .AsyncRetry (
707707 initial = 1.0 ,
708708 maximum = 10.0 ,
709709 multiplier = 1.3 ,
@@ -800,7 +800,7 @@ async def sample_create_policy():
800800 This corresponds to the ``policy`` field
801801 on the ``request`` instance; if ``request`` is provided, this
802802 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,
804804 should be retried.
805805 timeout (float): The timeout for this request.
806806 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -835,7 +835,7 @@ async def sample_create_policy():
835835 # and friendly error handling.
836836 rpc = gapic_v1 .method_async .wrap_method (
837837 self ._client ._transport .create_policy ,
838- default_retry = retries .Retry (
838+ default_retry = retries .AsyncRetry (
839839 initial = 1.0 ,
840840 maximum = 10.0 ,
841841 multiplier = 1.3 ,
@@ -921,7 +921,7 @@ async def sample_update_policy():
921921 This corresponds to the ``policy`` field
922922 on the ``request`` instance; if ``request`` is provided, this
923923 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,
925925 should be retried.
926926 timeout (float): The timeout for this request.
927927 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -954,7 +954,7 @@ async def sample_update_policy():
954954 # and friendly error handling.
955955 rpc = gapic_v1 .method_async .wrap_method (
956956 self ._client ._transport .update_policy ,
957- default_retry = retries .Retry (
957+ default_retry = retries .AsyncRetry (
958958 initial = 1.0 ,
959959 maximum = 10.0 ,
960960 multiplier = 1.3 ,
@@ -1037,7 +1037,7 @@ async def sample_delete_policy():
10371037 This corresponds to the ``name`` field
10381038 on the ``request`` instance; if ``request`` is provided, this
10391039 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,
10411041 should be retried.
10421042 timeout (float): The timeout for this request.
10431043 metadata (Sequence[Tuple[str, str]]): Strings which should be
@@ -1064,7 +1064,7 @@ async def sample_delete_policy():
10641064 # and friendly error handling.
10651065 rpc = gapic_v1 .method_async .wrap_method (
10661066 self ._client ._transport .delete_policy ,
1067- default_retry = retries .Retry (
1067+ default_retry = retries .AsyncRetry (
10681068 initial = 1.0 ,
10691069 maximum = 10.0 ,
10701070 multiplier = 1.3 ,
0 commit comments