Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit a395340

Browse files
fix: Add service_yaml parameters to metastore_py_gapic (#209)
* fix: Add service_yaml_parameters to `metastore_py_gapic` PiperOrigin-RevId: 513567026 Source-Link: googleapis/googleapis@5e4dc85 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c270568a272ef4c45b5b6b9bc52529f9c4b814cf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzI3MDU2OGEyNzJlZjRjNDViNWI2YjliYzUyNTI5ZjljNGI4MTRjZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7a24184 commit a395340

File tree

21 files changed

+8087
-2
lines changed

21 files changed

+8087
-2
lines changed

google/cloud/metastore_v1/services/dataproc_metastore/async_client.py

Lines changed: 575 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1/services/dataproc_metastore/client.py

Lines changed: 575 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1/services/dataproc_metastore/transports/base.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from google.api_core import retry as retries
2323
import google.auth # type: ignore
2424
from google.auth import credentials as ga_credentials # type: ignore
25+
from google.cloud.location import locations_pb2 # type: ignore
26+
from google.iam.v1 import iam_policy_pb2 # type: ignore
27+
from google.iam.v1 import policy_pb2 # type: ignore
2528
from google.longrunning import operations_pb2 # type: ignore
2629
from google.oauth2 import service_account # type: ignore
2730

@@ -354,6 +357,84 @@ def delete_backup(
354357
]:
355358
raise NotImplementedError()
356359

360+
@property
361+
def list_operations(
362+
self,
363+
) -> Callable[
364+
[operations_pb2.ListOperationsRequest],
365+
Union[
366+
operations_pb2.ListOperationsResponse,
367+
Awaitable[operations_pb2.ListOperationsResponse],
368+
],
369+
]:
370+
raise NotImplementedError()
371+
372+
@property
373+
def get_operation(
374+
self,
375+
) -> Callable[
376+
[operations_pb2.GetOperationRequest],
377+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
378+
]:
379+
raise NotImplementedError()
380+
381+
@property
382+
def delete_operation(
383+
self,
384+
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
385+
raise NotImplementedError()
386+
387+
@property
388+
def set_iam_policy(
389+
self,
390+
) -> Callable[
391+
[iam_policy_pb2.SetIamPolicyRequest],
392+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
393+
]:
394+
raise NotImplementedError()
395+
396+
@property
397+
def get_iam_policy(
398+
self,
399+
) -> Callable[
400+
[iam_policy_pb2.GetIamPolicyRequest],
401+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
402+
]:
403+
raise NotImplementedError()
404+
405+
@property
406+
def test_iam_permissions(
407+
self,
408+
) -> Callable[
409+
[iam_policy_pb2.TestIamPermissionsRequest],
410+
Union[
411+
iam_policy_pb2.TestIamPermissionsResponse,
412+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
413+
],
414+
]:
415+
raise NotImplementedError()
416+
417+
@property
418+
def get_location(
419+
self,
420+
) -> Callable[
421+
[locations_pb2.GetLocationRequest],
422+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
423+
]:
424+
raise NotImplementedError()
425+
426+
@property
427+
def list_locations(
428+
self,
429+
) -> Callable[
430+
[locations_pb2.ListLocationsRequest],
431+
Union[
432+
locations_pb2.ListLocationsResponse,
433+
Awaitable[locations_pb2.ListLocationsResponse],
434+
],
435+
]:
436+
raise NotImplementedError()
437+
357438
@property
358439
def kind(self) -> str:
359440
raise NotImplementedError()

google/cloud/metastore_v1/services/dataproc_metastore/transports/grpc.py

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import google.auth # type: ignore
2121
from google.auth import credentials as ga_credentials # type: ignore
2222
from google.auth.transport.grpc import SslCredentials # type: ignore
23+
from google.cloud.location import locations_pb2 # type: ignore
24+
from google.iam.v1 import iam_policy_pb2 # type: ignore
25+
from google.iam.v1 import policy_pb2 # type: ignore
2326
from google.longrunning import operations_pb2 # type: ignore
2427
import grpc # type: ignore
2528

@@ -660,6 +663,175 @@ def delete_backup(
660663
def close(self):
661664
self.grpc_channel.close()
662665

666+
@property
667+
def delete_operation(
668+
self,
669+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
670+
r"""Return a callable for the delete_operation method over gRPC."""
671+
# Generate a "stub function" on-the-fly which will actually make
672+
# the request.
673+
# gRPC handles serialization and deserialization, so we just need
674+
# to pass in the functions for each.
675+
if "delete_operation" not in self._stubs:
676+
self._stubs["delete_operation"] = self.grpc_channel.unary_unary(
677+
"/google.longrunning.Operations/DeleteOperation",
678+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
679+
response_deserializer=None,
680+
)
681+
return self._stubs["delete_operation"]
682+
683+
@property
684+
def get_operation(
685+
self,
686+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
687+
r"""Return a callable for the get_operation method over gRPC."""
688+
# Generate a "stub function" on-the-fly which will actually make
689+
# the request.
690+
# gRPC handles serialization and deserialization, so we just need
691+
# to pass in the functions for each.
692+
if "get_operation" not in self._stubs:
693+
self._stubs["get_operation"] = self.grpc_channel.unary_unary(
694+
"/google.longrunning.Operations/GetOperation",
695+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
696+
response_deserializer=operations_pb2.Operation.FromString,
697+
)
698+
return self._stubs["get_operation"]
699+
700+
@property
701+
def list_operations(
702+
self,
703+
) -> Callable[
704+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
705+
]:
706+
r"""Return a callable for the list_operations method over gRPC."""
707+
# Generate a "stub function" on-the-fly which will actually make
708+
# the request.
709+
# gRPC handles serialization and deserialization, so we just need
710+
# to pass in the functions for each.
711+
if "list_operations" not in self._stubs:
712+
self._stubs["list_operations"] = self.grpc_channel.unary_unary(
713+
"/google.longrunning.Operations/ListOperations",
714+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
715+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
716+
)
717+
return self._stubs["list_operations"]
718+
719+
@property
720+
def list_locations(
721+
self,
722+
) -> Callable[
723+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
724+
]:
725+
r"""Return a callable for the list locations method over gRPC."""
726+
# Generate a "stub function" on-the-fly which will actually make
727+
# the request.
728+
# gRPC handles serialization and deserialization, so we just need
729+
# to pass in the functions for each.
730+
if "list_locations" not in self._stubs:
731+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
732+
"/google.cloud.location.Locations/ListLocations",
733+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
734+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
735+
)
736+
return self._stubs["list_locations"]
737+
738+
@property
739+
def get_location(
740+
self,
741+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
742+
r"""Return a callable for the list locations method over gRPC."""
743+
# Generate a "stub function" on-the-fly which will actually make
744+
# the request.
745+
# gRPC handles serialization and deserialization, so we just need
746+
# to pass in the functions for each.
747+
if "get_location" not in self._stubs:
748+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
749+
"/google.cloud.location.Locations/GetLocation",
750+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
751+
response_deserializer=locations_pb2.Location.FromString,
752+
)
753+
return self._stubs["get_location"]
754+
755+
@property
756+
def set_iam_policy(
757+
self,
758+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
759+
r"""Return a callable for the set iam policy method over gRPC.
760+
Sets the IAM access control policy on the specified
761+
function. Replaces any existing policy.
762+
Returns:
763+
Callable[[~.SetIamPolicyRequest],
764+
~.Policy]:
765+
A function that, when called, will call the underlying RPC
766+
on the server.
767+
"""
768+
# Generate a "stub function" on-the-fly which will actually make
769+
# the request.
770+
# gRPC handles serialization and deserialization, so we just need
771+
# to pass in the functions for each.
772+
if "set_iam_policy" not in self._stubs:
773+
self._stubs["set_iam_policy"] = self.grpc_channel.unary_unary(
774+
"/google.iam.v1.IAMPolicy/SetIamPolicy",
775+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
776+
response_deserializer=policy_pb2.Policy.FromString,
777+
)
778+
return self._stubs["set_iam_policy"]
779+
780+
@property
781+
def get_iam_policy(
782+
self,
783+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
784+
r"""Return a callable for the get iam policy method over gRPC.
785+
Gets the IAM access control policy for a function.
786+
Returns an empty policy if the function exists and does
787+
not have a policy set.
788+
Returns:
789+
Callable[[~.GetIamPolicyRequest],
790+
~.Policy]:
791+
A function that, when called, will call the underlying RPC
792+
on the server.
793+
"""
794+
# Generate a "stub function" on-the-fly which will actually make
795+
# the request.
796+
# gRPC handles serialization and deserialization, so we just need
797+
# to pass in the functions for each.
798+
if "get_iam_policy" not in self._stubs:
799+
self._stubs["get_iam_policy"] = self.grpc_channel.unary_unary(
800+
"/google.iam.v1.IAMPolicy/GetIamPolicy",
801+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
802+
response_deserializer=policy_pb2.Policy.FromString,
803+
)
804+
return self._stubs["get_iam_policy"]
805+
806+
@property
807+
def test_iam_permissions(
808+
self,
809+
) -> Callable[
810+
[iam_policy_pb2.TestIamPermissionsRequest],
811+
iam_policy_pb2.TestIamPermissionsResponse,
812+
]:
813+
r"""Return a callable for the test iam permissions method over gRPC.
814+
Tests the specified permissions against the IAM access control
815+
policy for a function. If the function does not exist, this will
816+
return an empty set of permissions, not a NOT_FOUND error.
817+
Returns:
818+
Callable[[~.TestIamPermissionsRequest],
819+
~.TestIamPermissionsResponse]:
820+
A function that, when called, will call the underlying RPC
821+
on the server.
822+
"""
823+
# Generate a "stub function" on-the-fly which will actually make
824+
# the request.
825+
# gRPC handles serialization and deserialization, so we just need
826+
# to pass in the functions for each.
827+
if "test_iam_permissions" not in self._stubs:
828+
self._stubs["test_iam_permissions"] = self.grpc_channel.unary_unary(
829+
"/google.iam.v1.IAMPolicy/TestIamPermissions",
830+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
831+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
832+
)
833+
return self._stubs["test_iam_permissions"]
834+
663835
@property
664836
def kind(self) -> str:
665837
return "grpc"

0 commit comments

Comments
 (0)