Skip to content

Commit bd05a70

Browse files
build(python): [google-cloud-kms] remove unused generator option add-iam-methods (#13583)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 732654622 Source-Link: googleapis/googleapis@02306e9 Source-Link: googleapis/googleapis-gen@76e92c5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy8uT3dsQm90LnlhbWwiLCJoIjoiNzZlOTJjNTBlZGVhNDUyY2Q1NDFiYmNjNDE0YzdlYzU0ZmU2ODM0MiJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 144eb43 commit bd05a70

File tree

23 files changed

+1588
-1651
lines changed

23 files changed

+1588
-1651
lines changed

packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/async_client.py

Lines changed: 121 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -764,116 +764,6 @@ async def get_operation(
764764
# Done; return the response.
765765
return response
766766

767-
async def get_location(
768-
self,
769-
request: Optional[locations_pb2.GetLocationRequest] = None,
770-
*,
771-
retry: OptionalRetry = gapic_v1.method.DEFAULT,
772-
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
773-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
774-
) -> locations_pb2.Location:
775-
r"""Gets information about a location.
776-
777-
Args:
778-
request (:class:`~.location_pb2.GetLocationRequest`):
779-
The request object. Request message for
780-
`GetLocation` method.
781-
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
782-
if any, should be retried.
783-
timeout (float): The timeout for this request.
784-
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
785-
sent along with the request as metadata. Normally, each value must be of type `str`,
786-
but for metadata keys ending with the suffix `-bin`, the corresponding values must
787-
be of type `bytes`.
788-
Returns:
789-
~.location_pb2.Location:
790-
Location object.
791-
"""
792-
# Create or coerce a protobuf request object.
793-
# The request isn't a proto-plus wrapped type,
794-
# so it must be constructed via keyword expansion.
795-
if isinstance(request, dict):
796-
request = locations_pb2.GetLocationRequest(**request)
797-
798-
# Wrap the RPC method; this adds retry and timeout information,
799-
# and friendly error handling.
800-
rpc = self.transport._wrapped_methods[self._client._transport.get_location]
801-
802-
# Certain fields should be provided within the metadata header;
803-
# add these here.
804-
metadata = tuple(metadata) + (
805-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
806-
)
807-
808-
# Validate the universe domain.
809-
self._client._validate_universe_domain()
810-
811-
# Send the request.
812-
response = await rpc(
813-
request,
814-
retry=retry,
815-
timeout=timeout,
816-
metadata=metadata,
817-
)
818-
819-
# Done; return the response.
820-
return response
821-
822-
async def list_locations(
823-
self,
824-
request: Optional[locations_pb2.ListLocationsRequest] = None,
825-
*,
826-
retry: OptionalRetry = gapic_v1.method.DEFAULT,
827-
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
828-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
829-
) -> locations_pb2.ListLocationsResponse:
830-
r"""Lists information about the supported locations for this service.
831-
832-
Args:
833-
request (:class:`~.location_pb2.ListLocationsRequest`):
834-
The request object. Request message for
835-
`ListLocations` method.
836-
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
837-
if any, should be retried.
838-
timeout (float): The timeout for this request.
839-
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
840-
sent along with the request as metadata. Normally, each value must be of type `str`,
841-
but for metadata keys ending with the suffix `-bin`, the corresponding values must
842-
be of type `bytes`.
843-
Returns:
844-
~.location_pb2.ListLocationsResponse:
845-
Response message for ``ListLocations`` method.
846-
"""
847-
# Create or coerce a protobuf request object.
848-
# The request isn't a proto-plus wrapped type,
849-
# so it must be constructed via keyword expansion.
850-
if isinstance(request, dict):
851-
request = locations_pb2.ListLocationsRequest(**request)
852-
853-
# Wrap the RPC method; this adds retry and timeout information,
854-
# and friendly error handling.
855-
rpc = self.transport._wrapped_methods[self._client._transport.list_locations]
856-
857-
# Certain fields should be provided within the metadata header;
858-
# add these here.
859-
metadata = tuple(metadata) + (
860-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
861-
)
862-
863-
# Validate the universe domain.
864-
self._client._validate_universe_domain()
865-
866-
# Send the request.
867-
response = await rpc(
868-
request,
869-
retry=retry,
870-
timeout=timeout,
871-
metadata=metadata,
872-
)
873-
874-
# Done; return the response.
875-
return response
876-
877767
async def set_iam_policy(
878768
self,
879769
request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None,
@@ -887,7 +777,7 @@ async def set_iam_policy(
887777
Replaces any existing policy.
888778
889779
Args:
890-
request (:class:`~.policy_pb2.SetIamPolicyRequest`):
780+
request (:class:`~.iam_policy_pb2.SetIamPolicyRequest`):
891781
The request object. Request message for `SetIamPolicy`
892782
method.
893783
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
@@ -1005,15 +895,15 @@ async def get_iam_policy(
1005895
) -> policy_pb2.Policy:
1006896
r"""Gets the IAM access control policy for a function.
1007897
1008-
Returns an empty policy if the function exists and does
1009-
not have a policy set.
898+
Returns an empty policy if the function exists and does not have a
899+
policy set.
1010900
1011901
Args:
1012902
request (:class:`~.iam_policy_pb2.GetIamPolicyRequest`):
1013903
The request object. Request message for `GetIamPolicy`
1014904
method.
1015-
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1016-
should be retried.
905+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if
906+
any, should be retried.
1017907
timeout (float): The timeout for this request.
1018908
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1019909
sent along with the request as metadata. Normally, each value must be of type `str`,
@@ -1125,25 +1015,25 @@ async def test_iam_permissions(
11251015
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
11261016
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
11271017
) -> iam_policy_pb2.TestIamPermissionsResponse:
1128-
r"""Tests the specified permissions against the IAM access control
1018+
r"""Tests the specified IAM permissions against the IAM access control
11291019
policy for a function.
11301020
1131-
If the function does not exist, this will
1132-
return an empty set of permissions, not a NOT_FOUND error.
1021+
If the function does not exist, this will return an empty set
1022+
of permissions, not a NOT_FOUND error.
11331023
11341024
Args:
11351025
request (:class:`~.iam_policy_pb2.TestIamPermissionsRequest`):
11361026
The request object. Request message for
11371027
`TestIamPermissions` method.
1138-
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1139-
should be retried.
1028+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
1029+
if any, should be retried.
11401030
timeout (float): The timeout for this request.
11411031
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
11421032
sent along with the request as metadata. Normally, each value must be of type `str`,
11431033
but for metadata keys ending with the suffix `-bin`, the corresponding values must
11441034
be of type `bytes`.
11451035
Returns:
1146-
~iam_policy_pb2.PolicyTestIamPermissionsResponse:
1036+
~.iam_policy_pb2.TestIamPermissionsResponse:
11471037
Response message for ``TestIamPermissions`` method.
11481038
"""
11491039
# Create or coerce a protobuf request object.
@@ -1179,6 +1069,116 @@ async def test_iam_permissions(
11791069
# Done; return the response.
11801070
return response
11811071

1072+
async def get_location(
1073+
self,
1074+
request: Optional[locations_pb2.GetLocationRequest] = None,
1075+
*,
1076+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1077+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1078+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1079+
) -> locations_pb2.Location:
1080+
r"""Gets information about a location.
1081+
1082+
Args:
1083+
request (:class:`~.location_pb2.GetLocationRequest`):
1084+
The request object. Request message for
1085+
`GetLocation` method.
1086+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
1087+
if any, should be retried.
1088+
timeout (float): The timeout for this request.
1089+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1090+
sent along with the request as metadata. Normally, each value must be of type `str`,
1091+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1092+
be of type `bytes`.
1093+
Returns:
1094+
~.location_pb2.Location:
1095+
Location object.
1096+
"""
1097+
# Create or coerce a protobuf request object.
1098+
# The request isn't a proto-plus wrapped type,
1099+
# so it must be constructed via keyword expansion.
1100+
if isinstance(request, dict):
1101+
request = locations_pb2.GetLocationRequest(**request)
1102+
1103+
# Wrap the RPC method; this adds retry and timeout information,
1104+
# and friendly error handling.
1105+
rpc = self.transport._wrapped_methods[self._client._transport.get_location]
1106+
1107+
# Certain fields should be provided within the metadata header;
1108+
# add these here.
1109+
metadata = tuple(metadata) + (
1110+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1111+
)
1112+
1113+
# Validate the universe domain.
1114+
self._client._validate_universe_domain()
1115+
1116+
# Send the request.
1117+
response = await rpc(
1118+
request,
1119+
retry=retry,
1120+
timeout=timeout,
1121+
metadata=metadata,
1122+
)
1123+
1124+
# Done; return the response.
1125+
return response
1126+
1127+
async def list_locations(
1128+
self,
1129+
request: Optional[locations_pb2.ListLocationsRequest] = None,
1130+
*,
1131+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1132+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1133+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1134+
) -> locations_pb2.ListLocationsResponse:
1135+
r"""Lists information about the supported locations for this service.
1136+
1137+
Args:
1138+
request (:class:`~.location_pb2.ListLocationsRequest`):
1139+
The request object. Request message for
1140+
`ListLocations` method.
1141+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
1142+
if any, should be retried.
1143+
timeout (float): The timeout for this request.
1144+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1145+
sent along with the request as metadata. Normally, each value must be of type `str`,
1146+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
1147+
be of type `bytes`.
1148+
Returns:
1149+
~.location_pb2.ListLocationsResponse:
1150+
Response message for ``ListLocations`` method.
1151+
"""
1152+
# Create or coerce a protobuf request object.
1153+
# The request isn't a proto-plus wrapped type,
1154+
# so it must be constructed via keyword expansion.
1155+
if isinstance(request, dict):
1156+
request = locations_pb2.ListLocationsRequest(**request)
1157+
1158+
# Wrap the RPC method; this adds retry and timeout information,
1159+
# and friendly error handling.
1160+
rpc = self.transport._wrapped_methods[self._client._transport.list_locations]
1161+
1162+
# Certain fields should be provided within the metadata header;
1163+
# add these here.
1164+
metadata = tuple(metadata) + (
1165+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1166+
)
1167+
1168+
# Validate the universe domain.
1169+
self._client._validate_universe_domain()
1170+
1171+
# Send the request.
1172+
response = await rpc(
1173+
request,
1174+
retry=retry,
1175+
timeout=timeout,
1176+
metadata=metadata,
1177+
)
1178+
1179+
# Done; return the response.
1180+
return response
1181+
11821182
async def __aenter__(self) -> "AutokeyAsyncClient":
11831183
return self
11841184

0 commit comments

Comments
 (0)