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

Commit f53ca2d

Browse files
docs: update the comments of various networksecurity resources (#115)
- [ ] Regenerate this pull request now. fix: fix annotation of parent in Create*Request PiperOrigin-RevId: 462271672 Source-Link: googleapis/googleapis@9213efa Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb69561e8c95031d2f799285ed21bc65608eee96 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI2OTU2MWU4Yzk1MDMxZDJmNzk5Mjg1ZWQyMWJjNjU2MDhlZWU5NiJ9
1 parent 24c70bb commit f53ca2d

File tree

11 files changed

+3112
-6
lines changed

11 files changed

+3112
-6
lines changed

google/cloud/network_security_v1beta1/services/network_security/async_client.py

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

google/cloud/network_security_v1beta1/services/network_security/client.py

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

google/cloud/network_security_v1beta1/services/network_security/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
import pkg_resources
@@ -383,6 +386,90 @@ def delete_client_tls_policy(
383386
]:
384387
raise NotImplementedError()
385388

389+
@property
390+
def list_operations(
391+
self,
392+
) -> Callable[
393+
[operations_pb2.ListOperationsRequest],
394+
Union[
395+
operations_pb2.ListOperationsResponse,
396+
Awaitable[operations_pb2.ListOperationsResponse],
397+
],
398+
]:
399+
raise NotImplementedError()
400+
401+
@property
402+
def get_operation(
403+
self,
404+
) -> Callable[
405+
[operations_pb2.GetOperationRequest],
406+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
407+
]:
408+
raise NotImplementedError()
409+
410+
@property
411+
def cancel_operation(
412+
self,
413+
) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
414+
raise NotImplementedError()
415+
416+
@property
417+
def delete_operation(
418+
self,
419+
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
420+
raise NotImplementedError()
421+
422+
@property
423+
def set_iam_policy(
424+
self,
425+
) -> Callable[
426+
[iam_policy_pb2.SetIamPolicyRequest],
427+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
428+
]:
429+
raise NotImplementedError()
430+
431+
@property
432+
def get_iam_policy(
433+
self,
434+
) -> Callable[
435+
[iam_policy_pb2.GetIamPolicyRequest],
436+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
437+
]:
438+
raise NotImplementedError()
439+
440+
@property
441+
def test_iam_permissions(
442+
self,
443+
) -> Callable[
444+
[iam_policy_pb2.TestIamPermissionsRequest],
445+
Union[
446+
iam_policy_pb2.TestIamPermissionsResponse,
447+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
448+
],
449+
]:
450+
raise NotImplementedError()
451+
452+
@property
453+
def get_location(
454+
self,
455+
) -> Callable[
456+
[locations_pb2.GetLocationRequest],
457+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
458+
]:
459+
raise NotImplementedError()
460+
461+
@property
462+
def list_locations(
463+
self,
464+
) -> Callable[
465+
[locations_pb2.ListLocationsRequest],
466+
Union[
467+
locations_pb2.ListLocationsResponse,
468+
Awaitable[locations_pb2.ListLocationsResponse],
469+
],
470+
]:
471+
raise NotImplementedError()
472+
386473
@property
387474
def kind(self) -> str:
388475
raise NotImplementedError()

google/cloud/network_security_v1beta1/services/network_security/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

@@ -694,6 +697,192 @@ def delete_client_tls_policy(
694697
def close(self):
695698
self.grpc_channel.close()
696699

700+
@property
701+
def delete_operation(
702+
self,
703+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
704+
r"""Return a callable for the delete_operation method over gRPC."""
705+
# Generate a "stub function" on-the-fly which will actually make
706+
# the request.
707+
# gRPC handles serialization and deserialization, so we just need
708+
# to pass in the functions for each.
709+
if "delete_operation" not in self._stubs:
710+
self._stubs["delete_operation"] = self.grpc_channel.unary_unary(
711+
"/google.longrunning.Operations/DeleteOperation",
712+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
713+
response_deserializer=None,
714+
)
715+
return self._stubs["delete_operation"]
716+
717+
@property
718+
def cancel_operation(
719+
self,
720+
) -> Callable[[operations_pb2.CancelOperationRequest], None]:
721+
r"""Return a callable for the cancel_operation method over gRPC."""
722+
# Generate a "stub function" on-the-fly which will actually make
723+
# the request.
724+
# gRPC handles serialization and deserialization, so we just need
725+
# to pass in the functions for each.
726+
if "cancel_operation" not in self._stubs:
727+
self._stubs["cancel_operation"] = self.grpc_channel.unary_unary(
728+
"/google.longrunning.Operations/CancelOperation",
729+
request_serializer=operations_pb2.CancelOperationRequest.SerializeToString,
730+
response_deserializer=None,
731+
)
732+
return self._stubs["cancel_operation"]
733+
734+
@property
735+
def get_operation(
736+
self,
737+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
738+
r"""Return a callable for the get_operation method over gRPC."""
739+
# Generate a "stub function" on-the-fly which will actually make
740+
# the request.
741+
# gRPC handles serialization and deserialization, so we just need
742+
# to pass in the functions for each.
743+
if "get_operation" not in self._stubs:
744+
self._stubs["get_operation"] = self.grpc_channel.unary_unary(
745+
"/google.longrunning.Operations/GetOperation",
746+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
747+
response_deserializer=operations_pb2.Operation.FromString,
748+
)
749+
return self._stubs["get_operation"]
750+
751+
@property
752+
def list_operations(
753+
self,
754+
) -> Callable[
755+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
756+
]:
757+
r"""Return a callable for the list_operations method over gRPC."""
758+
# Generate a "stub function" on-the-fly which will actually make
759+
# the request.
760+
# gRPC handles serialization and deserialization, so we just need
761+
# to pass in the functions for each.
762+
if "list_operations" not in self._stubs:
763+
self._stubs["list_operations"] = self.grpc_channel.unary_unary(
764+
"/google.longrunning.Operations/ListOperations",
765+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
766+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
767+
)
768+
return self._stubs["list_operations"]
769+
770+
@property
771+
def list_locations(
772+
self,
773+
) -> Callable[
774+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
775+
]:
776+
r"""Return a callable for the list locations method over gRPC."""
777+
# Generate a "stub function" on-the-fly which will actually make
778+
# the request.
779+
# gRPC handles serialization and deserialization, so we just need
780+
# to pass in the functions for each.
781+
if "list_locations" not in self._stubs:
782+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
783+
"/google.cloud.location.Locations/ListLocations",
784+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
785+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
786+
)
787+
return self._stubs["list_locations"]
788+
789+
@property
790+
def get_location(
791+
self,
792+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
793+
r"""Return a callable for the list locations method over gRPC."""
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_location" not in self._stubs:
799+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
800+
"/google.cloud.location.Locations/GetLocation",
801+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
802+
response_deserializer=locations_pb2.Location.FromString,
803+
)
804+
return self._stubs["get_location"]
805+
806+
@property
807+
def set_iam_policy(
808+
self,
809+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
810+
r"""Return a callable for the set iam policy method over gRPC.
811+
Sets the IAM access control policy on the specified
812+
function. Replaces any existing policy.
813+
Returns:
814+
Callable[[~.SetIamPolicyRequest],
815+
~.Policy]:
816+
A function that, when called, will call the underlying RPC
817+
on the server.
818+
"""
819+
# Generate a "stub function" on-the-fly which will actually make
820+
# the request.
821+
# gRPC handles serialization and deserialization, so we just need
822+
# to pass in the functions for each.
823+
if "set_iam_policy" not in self._stubs:
824+
self._stubs["set_iam_policy"] = self.grpc_channel.unary_unary(
825+
"/google.iam.v1.IAMPolicy/SetIamPolicy",
826+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
827+
response_deserializer=policy_pb2.Policy.FromString,
828+
)
829+
return self._stubs["set_iam_policy"]
830+
831+
@property
832+
def get_iam_policy(
833+
self,
834+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
835+
r"""Return a callable for the get iam policy method over gRPC.
836+
Gets the IAM access control policy for a function.
837+
Returns an empty policy if the function exists and does
838+
not have a policy set.
839+
Returns:
840+
Callable[[~.GetIamPolicyRequest],
841+
~.Policy]:
842+
A function that, when called, will call the underlying RPC
843+
on the server.
844+
"""
845+
# Generate a "stub function" on-the-fly which will actually make
846+
# the request.
847+
# gRPC handles serialization and deserialization, so we just need
848+
# to pass in the functions for each.
849+
if "get_iam_policy" not in self._stubs:
850+
self._stubs["get_iam_policy"] = self.grpc_channel.unary_unary(
851+
"/google.iam.v1.IAMPolicy/GetIamPolicy",
852+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
853+
response_deserializer=policy_pb2.Policy.FromString,
854+
)
855+
return self._stubs["get_iam_policy"]
856+
857+
@property
858+
def test_iam_permissions(
859+
self,
860+
) -> Callable[
861+
[iam_policy_pb2.TestIamPermissionsRequest],
862+
iam_policy_pb2.TestIamPermissionsResponse,
863+
]:
864+
r"""Return a callable for the test iam permissions method over gRPC.
865+
Tests the specified permissions against the IAM access control
866+
policy for a function. If the function does not exist, this will
867+
return an empty set of permissions, not a NOT_FOUND error.
868+
Returns:
869+
Callable[[~.TestIamPermissionsRequest],
870+
~.TestIamPermissionsResponse]:
871+
A function that, when called, will call the underlying RPC
872+
on the server.
873+
"""
874+
# Generate a "stub function" on-the-fly which will actually make
875+
# the request.
876+
# gRPC handles serialization and deserialization, so we just need
877+
# to pass in the functions for each.
878+
if "test_iam_permissions" not in self._stubs:
879+
self._stubs["test_iam_permissions"] = self.grpc_channel.unary_unary(
880+
"/google.iam.v1.IAMPolicy/TestIamPermissions",
881+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
882+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
883+
)
884+
return self._stubs["test_iam_permissions"]
885+
697886
@property
698887
def kind(self) -> str:
699888
return "grpc"

0 commit comments

Comments
 (0)