|
38 | 38 | from google.auth.transport import mtls # type: ignore |
39 | 39 | from google.auth.transport.grpc import SslCredentials # type: ignore |
40 | 40 | from google.oauth2 import service_account # type: ignore |
41 | | -import pkg_resources |
| 41 | + |
| 42 | +from google.cloud.deploy_v1 import gapic_version as package_version |
42 | 43 |
|
43 | 44 | try: |
44 | 45 | OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] |
@@ -670,7 +671,7 @@ def list_delivery_pipelines( |
670 | 671 | *, |
671 | 672 | parent: Optional[str] = None, |
672 | 673 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
673 | | - timeout: Optional[float] = None, |
| 674 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
674 | 675 | metadata: Sequence[Tuple[str, str]] = (), |
675 | 676 | ) -> pagers.ListDeliveryPipelinesPager: |
676 | 677 | r"""Lists DeliveryPipelines in a given project and |
@@ -786,7 +787,7 @@ def get_delivery_pipeline( |
786 | 787 | *, |
787 | 788 | name: Optional[str] = None, |
788 | 789 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
789 | | - timeout: Optional[float] = None, |
| 790 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
790 | 791 | metadata: Sequence[Tuple[str, str]] = (), |
791 | 792 | ) -> cloud_deploy.DeliveryPipeline: |
792 | 793 | r"""Gets details of a single DeliveryPipeline. |
@@ -896,7 +897,7 @@ def create_delivery_pipeline( |
896 | 897 | delivery_pipeline: Optional[cloud_deploy.DeliveryPipeline] = None, |
897 | 898 | delivery_pipeline_id: Optional[str] = None, |
898 | 899 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
899 | | - timeout: Optional[float] = None, |
| 900 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
900 | 901 | metadata: Sequence[Tuple[str, str]] = (), |
901 | 902 | ) -> operation.Operation: |
902 | 903 | r"""Creates a new DeliveryPipeline in a given project and |
@@ -1037,7 +1038,7 @@ def update_delivery_pipeline( |
1037 | 1038 | delivery_pipeline: Optional[cloud_deploy.DeliveryPipeline] = None, |
1038 | 1039 | update_mask: Optional[field_mask_pb2.FieldMask] = None, |
1039 | 1040 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1040 | | - timeout: Optional[float] = None, |
| 1041 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1041 | 1042 | metadata: Sequence[Tuple[str, str]] = (), |
1042 | 1043 | ) -> operation.Operation: |
1043 | 1044 | r"""Updates the parameters of a single DeliveryPipeline. |
@@ -1173,7 +1174,7 @@ def delete_delivery_pipeline( |
1173 | 1174 | *, |
1174 | 1175 | name: Optional[str] = None, |
1175 | 1176 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1176 | | - timeout: Optional[float] = None, |
| 1177 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1177 | 1178 | metadata: Sequence[Tuple[str, str]] = (), |
1178 | 1179 | ) -> operation.Operation: |
1179 | 1180 | r"""Deletes a single DeliveryPipeline. |
@@ -1298,7 +1299,7 @@ def list_targets( |
1298 | 1299 | *, |
1299 | 1300 | parent: Optional[str] = None, |
1300 | 1301 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1301 | | - timeout: Optional[float] = None, |
| 1302 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1302 | 1303 | metadata: Sequence[Tuple[str, str]] = (), |
1303 | 1304 | ) -> pagers.ListTargetsPager: |
1304 | 1305 | r"""Lists Targets in a given project and location. |
@@ -1413,7 +1414,7 @@ def get_target( |
1413 | 1414 | *, |
1414 | 1415 | name: Optional[str] = None, |
1415 | 1416 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1416 | | - timeout: Optional[float] = None, |
| 1417 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1417 | 1418 | metadata: Sequence[Tuple[str, str]] = (), |
1418 | 1419 | ) -> cloud_deploy.Target: |
1419 | 1420 | r"""Gets details of a single Target. |
@@ -1518,7 +1519,7 @@ def create_target( |
1518 | 1519 | target: Optional[cloud_deploy.Target] = None, |
1519 | 1520 | target_id: Optional[str] = None, |
1520 | 1521 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1521 | | - timeout: Optional[float] = None, |
| 1522 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1522 | 1523 | metadata: Sequence[Tuple[str, str]] = (), |
1523 | 1524 | ) -> operation.Operation: |
1524 | 1525 | r"""Creates a new Target in a given project and location. |
@@ -1655,7 +1656,7 @@ def update_target( |
1655 | 1656 | target: Optional[cloud_deploy.Target] = None, |
1656 | 1657 | update_mask: Optional[field_mask_pb2.FieldMask] = None, |
1657 | 1658 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1658 | | - timeout: Optional[float] = None, |
| 1659 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1659 | 1660 | metadata: Sequence[Tuple[str, str]] = (), |
1660 | 1661 | ) -> operation.Operation: |
1661 | 1662 | r"""Updates the parameters of a single Target. |
@@ -1787,7 +1788,7 @@ def delete_target( |
1787 | 1788 | *, |
1788 | 1789 | name: Optional[str] = None, |
1789 | 1790 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1790 | | - timeout: Optional[float] = None, |
| 1791 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1791 | 1792 | metadata: Sequence[Tuple[str, str]] = (), |
1792 | 1793 | ) -> operation.Operation: |
1793 | 1794 | r"""Deletes a single Target. |
@@ -1912,7 +1913,7 @@ def list_releases( |
1912 | 1913 | *, |
1913 | 1914 | parent: Optional[str] = None, |
1914 | 1915 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1915 | | - timeout: Optional[float] = None, |
| 1916 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1916 | 1917 | metadata: Sequence[Tuple[str, str]] = (), |
1917 | 1918 | ) -> pagers.ListReleasesPager: |
1918 | 1919 | r"""Lists Releases in a given project and location. |
@@ -2026,7 +2027,7 @@ def get_release( |
2026 | 2027 | *, |
2027 | 2028 | name: Optional[str] = None, |
2028 | 2029 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2029 | | - timeout: Optional[float] = None, |
| 2030 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2030 | 2031 | metadata: Sequence[Tuple[str, str]] = (), |
2031 | 2032 | ) -> cloud_deploy.Release: |
2032 | 2033 | r"""Gets details of a single Release. |
@@ -2131,7 +2132,7 @@ def create_release( |
2131 | 2132 | release: Optional[cloud_deploy.Release] = None, |
2132 | 2133 | release_id: Optional[str] = None, |
2133 | 2134 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2134 | | - timeout: Optional[float] = None, |
| 2135 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2135 | 2136 | metadata: Sequence[Tuple[str, str]] = (), |
2136 | 2137 | ) -> operation.Operation: |
2137 | 2138 | r"""Creates a new Release in a given project and |
@@ -2268,7 +2269,7 @@ def abandon_release( |
2268 | 2269 | *, |
2269 | 2270 | name: Optional[str] = None, |
2270 | 2271 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2271 | | - timeout: Optional[float] = None, |
| 2272 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2272 | 2273 | metadata: Sequence[Tuple[str, str]] = (), |
2273 | 2274 | ) -> cloud_deploy.AbandonReleaseResponse: |
2274 | 2275 | r"""Abandons a Release in the Delivery Pipeline. |
@@ -2370,7 +2371,7 @@ def approve_rollout( |
2370 | 2371 | *, |
2371 | 2372 | name: Optional[str] = None, |
2372 | 2373 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2373 | | - timeout: Optional[float] = None, |
| 2374 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2374 | 2375 | metadata: Sequence[Tuple[str, str]] = (), |
2375 | 2376 | ) -> cloud_deploy.ApproveRolloutResponse: |
2376 | 2377 | r"""Approves a Rollout. |
@@ -2473,7 +2474,7 @@ def list_rollouts( |
2473 | 2474 | *, |
2474 | 2475 | parent: Optional[str] = None, |
2475 | 2476 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2476 | | - timeout: Optional[float] = None, |
| 2477 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2477 | 2478 | metadata: Sequence[Tuple[str, str]] = (), |
2478 | 2479 | ) -> pagers.ListRolloutsPager: |
2479 | 2480 | r"""Lists Rollouts in a given project and location. |
@@ -2588,7 +2589,7 @@ def get_rollout( |
2588 | 2589 | *, |
2589 | 2590 | name: Optional[str] = None, |
2590 | 2591 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2591 | | - timeout: Optional[float] = None, |
| 2592 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2592 | 2593 | metadata: Sequence[Tuple[str, str]] = (), |
2593 | 2594 | ) -> cloud_deploy.Rollout: |
2594 | 2595 | r"""Gets details of a single Rollout. |
@@ -2694,7 +2695,7 @@ def create_rollout( |
2694 | 2695 | rollout: Optional[cloud_deploy.Rollout] = None, |
2695 | 2696 | rollout_id: Optional[str] = None, |
2696 | 2697 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2697 | | - timeout: Optional[float] = None, |
| 2698 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2698 | 2699 | metadata: Sequence[Tuple[str, str]] = (), |
2699 | 2700 | ) -> operation.Operation: |
2700 | 2701 | r"""Creates a new Rollout in a given project and |
@@ -2837,7 +2838,7 @@ def retry_job( |
2837 | 2838 | phase_id: Optional[str] = None, |
2838 | 2839 | job_id: Optional[str] = None, |
2839 | 2840 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2840 | | - timeout: Optional[float] = None, |
| 2841 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2841 | 2842 | metadata: Sequence[Tuple[str, str]] = (), |
2842 | 2843 | ) -> cloud_deploy.RetryJobResponse: |
2843 | 2844 | r"""Retries the specified Job in a Rollout. |
@@ -2959,7 +2960,7 @@ def list_job_runs( |
2959 | 2960 | *, |
2960 | 2961 | parent: Optional[str] = None, |
2961 | 2962 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2962 | | - timeout: Optional[float] = None, |
| 2963 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2963 | 2964 | metadata: Sequence[Tuple[str, str]] = (), |
2964 | 2965 | ) -> pagers.ListJobRunsPager: |
2965 | 2966 | r"""Lists JobRuns in a given project and location. |
@@ -3074,7 +3075,7 @@ def get_job_run( |
3074 | 3075 | *, |
3075 | 3076 | name: Optional[str] = None, |
3076 | 3077 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3077 | | - timeout: Optional[float] = None, |
| 3078 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3078 | 3079 | metadata: Sequence[Tuple[str, str]] = (), |
3079 | 3080 | ) -> cloud_deploy.JobRun: |
3080 | 3081 | r"""Gets details of a single JobRun. |
@@ -3178,7 +3179,7 @@ def get_config( |
3178 | 3179 | *, |
3179 | 3180 | name: Optional[str] = None, |
3180 | 3181 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3181 | | - timeout: Optional[float] = None, |
| 3182 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3182 | 3183 | metadata: Sequence[Tuple[str, str]] = (), |
3183 | 3184 | ) -> cloud_deploy.Config: |
3184 | 3185 | r"""Gets the configuration for a location. |
@@ -3289,7 +3290,7 @@ def list_operations( |
3289 | 3290 | request: Optional[operations_pb2.ListOperationsRequest] = None, |
3290 | 3291 | *, |
3291 | 3292 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3292 | | - timeout: Optional[float] = None, |
| 3293 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3293 | 3294 | metadata: Sequence[Tuple[str, str]] = (), |
3294 | 3295 | ) -> operations_pb2.ListOperationsResponse: |
3295 | 3296 | r"""Lists operations that match the specified filter in the request. |
@@ -3343,7 +3344,7 @@ def get_operation( |
3343 | 3344 | request: Optional[operations_pb2.GetOperationRequest] = None, |
3344 | 3345 | *, |
3345 | 3346 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3346 | | - timeout: Optional[float] = None, |
| 3347 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3347 | 3348 | metadata: Sequence[Tuple[str, str]] = (), |
3348 | 3349 | ) -> operations_pb2.Operation: |
3349 | 3350 | r"""Gets the latest state of a long-running operation. |
@@ -3397,7 +3398,7 @@ def delete_operation( |
3397 | 3398 | request: Optional[operations_pb2.DeleteOperationRequest] = None, |
3398 | 3399 | *, |
3399 | 3400 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3400 | | - timeout: Optional[float] = None, |
| 3401 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3401 | 3402 | metadata: Sequence[Tuple[str, str]] = (), |
3402 | 3403 | ) -> None: |
3403 | 3404 | r"""Deletes a long-running operation. |
@@ -3452,7 +3453,7 @@ def cancel_operation( |
3452 | 3453 | request: Optional[operations_pb2.CancelOperationRequest] = None, |
3453 | 3454 | *, |
3454 | 3455 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3455 | | - timeout: Optional[float] = None, |
| 3456 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3456 | 3457 | metadata: Sequence[Tuple[str, str]] = (), |
3457 | 3458 | ) -> None: |
3458 | 3459 | r"""Starts asynchronous cancellation on a long-running operation. |
@@ -3506,7 +3507,7 @@ def set_iam_policy( |
3506 | 3507 | request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, |
3507 | 3508 | *, |
3508 | 3509 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3509 | | - timeout: Optional[float] = None, |
| 3510 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3510 | 3511 | metadata: Sequence[Tuple[str, str]] = (), |
3511 | 3512 | ) -> policy_pb2.Policy: |
3512 | 3513 | r"""Sets the IAM access control policy on the specified function. |
@@ -3626,7 +3627,7 @@ def get_iam_policy( |
3626 | 3627 | request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, |
3627 | 3628 | *, |
3628 | 3629 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3629 | | - timeout: Optional[float] = None, |
| 3630 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3630 | 3631 | metadata: Sequence[Tuple[str, str]] = (), |
3631 | 3632 | ) -> policy_pb2.Policy: |
3632 | 3633 | r"""Gets the IAM access control policy for a function. |
@@ -3747,7 +3748,7 @@ def test_iam_permissions( |
3747 | 3748 | request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, |
3748 | 3749 | *, |
3749 | 3750 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3750 | | - timeout: Optional[float] = None, |
| 3751 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3751 | 3752 | metadata: Sequence[Tuple[str, str]] = (), |
3752 | 3753 | ) -> iam_policy_pb2.TestIamPermissionsResponse: |
3753 | 3754 | r"""Tests the specified IAM permissions against the IAM access control |
@@ -3806,7 +3807,7 @@ def get_location( |
3806 | 3807 | request: Optional[locations_pb2.GetLocationRequest] = None, |
3807 | 3808 | *, |
3808 | 3809 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3809 | | - timeout: Optional[float] = None, |
| 3810 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3810 | 3811 | metadata: Sequence[Tuple[str, str]] = (), |
3811 | 3812 | ) -> locations_pb2.Location: |
3812 | 3813 | r"""Gets information about a location. |
@@ -3860,7 +3861,7 @@ def list_locations( |
3860 | 3861 | request: Optional[locations_pb2.ListLocationsRequest] = None, |
3861 | 3862 | *, |
3862 | 3863 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
3863 | | - timeout: Optional[float] = None, |
| 3864 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3864 | 3865 | metadata: Sequence[Tuple[str, str]] = (), |
3865 | 3866 | ) -> locations_pb2.ListLocationsResponse: |
3866 | 3867 | r"""Lists information about the supported locations for this service. |
@@ -3910,14 +3911,9 @@ def list_locations( |
3910 | 3911 | return response |
3911 | 3912 |
|
3912 | 3913 |
|
3913 | | -try: |
3914 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
3915 | | - gapic_version=pkg_resources.get_distribution( |
3916 | | - "google-cloud-deploy", |
3917 | | - ).version, |
3918 | | - ) |
3919 | | -except pkg_resources.DistributionNotFound: |
3920 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 3914 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 3915 | + gapic_version=package_version.__version__ |
| 3916 | +) |
3921 | 3917 |
|
3922 | 3918 |
|
3923 | 3919 | __all__ = ("CloudDeployClient",) |
0 commit comments