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

Commit 4ff9cb7

Browse files
docs: minor documentation fixes (#66)
* docs: minor documentation fixes PiperOrigin-RevId: 538564373 Source-Link: googleapis/googleapis@477cf96 Source-Link: https://github.com/googleapis/googleapis-gen/commit/51fbcf5f64fd2f1b8eee7f426da712e98cc7d960 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTFmYmNmNWY2NGZkMmYxYjhlZWU3ZjQyNmRhNzEyZTk4Y2M3ZDk2MCJ9 * 🦉 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 88769e3 commit 4ff9cb7

File tree

19 files changed

+4571
-42
lines changed

19 files changed

+4571
-42
lines changed

google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py

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

google/cloud/gke_backup_v1/services/backup_for_gke/client.py

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

google/cloud/gke_backup_v1/services/backup_for_gke/transports/base.py

Lines changed: 87 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

@@ -603,6 +606,90 @@ def get_volume_restore(
603606
]:
604607
raise NotImplementedError()
605608

609+
@property
610+
def list_operations(
611+
self,
612+
) -> Callable[
613+
[operations_pb2.ListOperationsRequest],
614+
Union[
615+
operations_pb2.ListOperationsResponse,
616+
Awaitable[operations_pb2.ListOperationsResponse],
617+
],
618+
]:
619+
raise NotImplementedError()
620+
621+
@property
622+
def get_operation(
623+
self,
624+
) -> Callable[
625+
[operations_pb2.GetOperationRequest],
626+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
627+
]:
628+
raise NotImplementedError()
629+
630+
@property
631+
def cancel_operation(
632+
self,
633+
) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
634+
raise NotImplementedError()
635+
636+
@property
637+
def delete_operation(
638+
self,
639+
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
640+
raise NotImplementedError()
641+
642+
@property
643+
def set_iam_policy(
644+
self,
645+
) -> Callable[
646+
[iam_policy_pb2.SetIamPolicyRequest],
647+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
648+
]:
649+
raise NotImplementedError()
650+
651+
@property
652+
def get_iam_policy(
653+
self,
654+
) -> Callable[
655+
[iam_policy_pb2.GetIamPolicyRequest],
656+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
657+
]:
658+
raise NotImplementedError()
659+
660+
@property
661+
def test_iam_permissions(
662+
self,
663+
) -> Callable[
664+
[iam_policy_pb2.TestIamPermissionsRequest],
665+
Union[
666+
iam_policy_pb2.TestIamPermissionsResponse,
667+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
668+
],
669+
]:
670+
raise NotImplementedError()
671+
672+
@property
673+
def get_location(
674+
self,
675+
) -> Callable[
676+
[locations_pb2.GetLocationRequest],
677+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
678+
]:
679+
raise NotImplementedError()
680+
681+
@property
682+
def list_locations(
683+
self,
684+
) -> Callable[
685+
[locations_pb2.ListLocationsRequest],
686+
Union[
687+
locations_pb2.ListLocationsResponse,
688+
Awaitable[locations_pb2.ListLocationsResponse],
689+
],
690+
]:
691+
raise NotImplementedError()
692+
606693
@property
607694
def kind(self) -> str:
608695
raise NotImplementedError()

google/cloud/gke_backup_v1/services/backup_for_gke/transports/grpc.py

Lines changed: 189 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

@@ -884,6 +887,192 @@ def get_volume_restore(
884887
def close(self):
885888
self.grpc_channel.close()
886889

890+
@property
891+
def delete_operation(
892+
self,
893+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
894+
r"""Return a callable for the delete_operation method over gRPC."""
895+
# Generate a "stub function" on-the-fly which will actually make
896+
# the request.
897+
# gRPC handles serialization and deserialization, so we just need
898+
# to pass in the functions for each.
899+
if "delete_operation" not in self._stubs:
900+
self._stubs["delete_operation"] = self.grpc_channel.unary_unary(
901+
"/google.longrunning.Operations/DeleteOperation",
902+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
903+
response_deserializer=None,
904+
)
905+
return self._stubs["delete_operation"]
906+
907+
@property
908+
def cancel_operation(
909+
self,
910+
) -> Callable[[operations_pb2.CancelOperationRequest], None]:
911+
r"""Return a callable for the cancel_operation method over gRPC."""
912+
# Generate a "stub function" on-the-fly which will actually make
913+
# the request.
914+
# gRPC handles serialization and deserialization, so we just need
915+
# to pass in the functions for each.
916+
if "cancel_operation" not in self._stubs:
917+
self._stubs["cancel_operation"] = self.grpc_channel.unary_unary(
918+
"/google.longrunning.Operations/CancelOperation",
919+
request_serializer=operations_pb2.CancelOperationRequest.SerializeToString,
920+
response_deserializer=None,
921+
)
922+
return self._stubs["cancel_operation"]
923+
924+
@property
925+
def get_operation(
926+
self,
927+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
928+
r"""Return a callable for the get_operation method over gRPC."""
929+
# Generate a "stub function" on-the-fly which will actually make
930+
# the request.
931+
# gRPC handles serialization and deserialization, so we just need
932+
# to pass in the functions for each.
933+
if "get_operation" not in self._stubs:
934+
self._stubs["get_operation"] = self.grpc_channel.unary_unary(
935+
"/google.longrunning.Operations/GetOperation",
936+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
937+
response_deserializer=operations_pb2.Operation.FromString,
938+
)
939+
return self._stubs["get_operation"]
940+
941+
@property
942+
def list_operations(
943+
self,
944+
) -> Callable[
945+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
946+
]:
947+
r"""Return a callable for the list_operations method over gRPC."""
948+
# Generate a "stub function" on-the-fly which will actually make
949+
# the request.
950+
# gRPC handles serialization and deserialization, so we just need
951+
# to pass in the functions for each.
952+
if "list_operations" not in self._stubs:
953+
self._stubs["list_operations"] = self.grpc_channel.unary_unary(
954+
"/google.longrunning.Operations/ListOperations",
955+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
956+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
957+
)
958+
return self._stubs["list_operations"]
959+
960+
@property
961+
def list_locations(
962+
self,
963+
) -> Callable[
964+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
965+
]:
966+
r"""Return a callable for the list locations method over gRPC."""
967+
# Generate a "stub function" on-the-fly which will actually make
968+
# the request.
969+
# gRPC handles serialization and deserialization, so we just need
970+
# to pass in the functions for each.
971+
if "list_locations" not in self._stubs:
972+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
973+
"/google.cloud.location.Locations/ListLocations",
974+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
975+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
976+
)
977+
return self._stubs["list_locations"]
978+
979+
@property
980+
def get_location(
981+
self,
982+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
983+
r"""Return a callable for the list locations method over gRPC."""
984+
# Generate a "stub function" on-the-fly which will actually make
985+
# the request.
986+
# gRPC handles serialization and deserialization, so we just need
987+
# to pass in the functions for each.
988+
if "get_location" not in self._stubs:
989+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
990+
"/google.cloud.location.Locations/GetLocation",
991+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
992+
response_deserializer=locations_pb2.Location.FromString,
993+
)
994+
return self._stubs["get_location"]
995+
996+
@property
997+
def set_iam_policy(
998+
self,
999+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
1000+
r"""Return a callable for the set iam policy method over gRPC.
1001+
Sets the IAM access control policy on the specified
1002+
function. Replaces any existing policy.
1003+
Returns:
1004+
Callable[[~.SetIamPolicyRequest],
1005+
~.Policy]:
1006+
A function that, when called, will call the underlying RPC
1007+
on the server.
1008+
"""
1009+
# Generate a "stub function" on-the-fly which will actually make
1010+
# the request.
1011+
# gRPC handles serialization and deserialization, so we just need
1012+
# to pass in the functions for each.
1013+
if "set_iam_policy" not in self._stubs:
1014+
self._stubs["set_iam_policy"] = self.grpc_channel.unary_unary(
1015+
"/google.iam.v1.IAMPolicy/SetIamPolicy",
1016+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
1017+
response_deserializer=policy_pb2.Policy.FromString,
1018+
)
1019+
return self._stubs["set_iam_policy"]
1020+
1021+
@property
1022+
def get_iam_policy(
1023+
self,
1024+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
1025+
r"""Return a callable for the get iam policy method over gRPC.
1026+
Gets the IAM access control policy for a function.
1027+
Returns an empty policy if the function exists and does
1028+
not have a policy set.
1029+
Returns:
1030+
Callable[[~.GetIamPolicyRequest],
1031+
~.Policy]:
1032+
A function that, when called, will call the underlying RPC
1033+
on the server.
1034+
"""
1035+
# Generate a "stub function" on-the-fly which will actually make
1036+
# the request.
1037+
# gRPC handles serialization and deserialization, so we just need
1038+
# to pass in the functions for each.
1039+
if "get_iam_policy" not in self._stubs:
1040+
self._stubs["get_iam_policy"] = self.grpc_channel.unary_unary(
1041+
"/google.iam.v1.IAMPolicy/GetIamPolicy",
1042+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
1043+
response_deserializer=policy_pb2.Policy.FromString,
1044+
)
1045+
return self._stubs["get_iam_policy"]
1046+
1047+
@property
1048+
def test_iam_permissions(
1049+
self,
1050+
) -> Callable[
1051+
[iam_policy_pb2.TestIamPermissionsRequest],
1052+
iam_policy_pb2.TestIamPermissionsResponse,
1053+
]:
1054+
r"""Return a callable for the test iam permissions method over gRPC.
1055+
Tests the specified permissions against the IAM access control
1056+
policy for a function. If the function does not exist, this will
1057+
return an empty set of permissions, not a NOT_FOUND error.
1058+
Returns:
1059+
Callable[[~.TestIamPermissionsRequest],
1060+
~.TestIamPermissionsResponse]:
1061+
A function that, when called, will call the underlying RPC
1062+
on the server.
1063+
"""
1064+
# Generate a "stub function" on-the-fly which will actually make
1065+
# the request.
1066+
# gRPC handles serialization and deserialization, so we just need
1067+
# to pass in the functions for each.
1068+
if "test_iam_permissions" not in self._stubs:
1069+
self._stubs["test_iam_permissions"] = self.grpc_channel.unary_unary(
1070+
"/google.iam.v1.IAMPolicy/TestIamPermissions",
1071+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
1072+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
1073+
)
1074+
return self._stubs["test_iam_permissions"]
1075+
8871076
@property
8881077
def kind(self) -> str:
8891078
return "grpc"

0 commit comments

Comments
 (0)