Skip to content

Commit c867f32

Browse files
fix: Add service_yaml_parameters to networkconnectivity_py_gapic (#234)
* fix: Add service_yaml_parameters to `networkconnectivity_py_gapic` PiperOrigin-RevId: 513621642 Source-Link: googleapis/googleapis@93aee4a Source-Link: googleapis/googleapis-gen@fa5f823 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmE1ZjgyM2MyYzJhMDMxYmJkZWE2NWQzZTg4N2YwMDRiMDFiMWIzNyJ9 * 🦉 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 ca63aa4 commit c867f32

File tree

15 files changed

+3107
-2
lines changed

15 files changed

+3107
-2
lines changed

packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/async_client.py

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

packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/client.py

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

packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/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

@@ -274,6 +277,90 @@ def delete_spoke(
274277
]:
275278
raise NotImplementedError()
276279

280+
@property
281+
def list_operations(
282+
self,
283+
) -> Callable[
284+
[operations_pb2.ListOperationsRequest],
285+
Union[
286+
operations_pb2.ListOperationsResponse,
287+
Awaitable[operations_pb2.ListOperationsResponse],
288+
],
289+
]:
290+
raise NotImplementedError()
291+
292+
@property
293+
def get_operation(
294+
self,
295+
) -> Callable[
296+
[operations_pb2.GetOperationRequest],
297+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
298+
]:
299+
raise NotImplementedError()
300+
301+
@property
302+
def cancel_operation(
303+
self,
304+
) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
305+
raise NotImplementedError()
306+
307+
@property
308+
def delete_operation(
309+
self,
310+
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
311+
raise NotImplementedError()
312+
313+
@property
314+
def set_iam_policy(
315+
self,
316+
) -> Callable[
317+
[iam_policy_pb2.SetIamPolicyRequest],
318+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
319+
]:
320+
raise NotImplementedError()
321+
322+
@property
323+
def get_iam_policy(
324+
self,
325+
) -> Callable[
326+
[iam_policy_pb2.GetIamPolicyRequest],
327+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
328+
]:
329+
raise NotImplementedError()
330+
331+
@property
332+
def test_iam_permissions(
333+
self,
334+
) -> Callable[
335+
[iam_policy_pb2.TestIamPermissionsRequest],
336+
Union[
337+
iam_policy_pb2.TestIamPermissionsResponse,
338+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
339+
],
340+
]:
341+
raise NotImplementedError()
342+
343+
@property
344+
def get_location(
345+
self,
346+
) -> Callable[
347+
[locations_pb2.GetLocationRequest],
348+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
349+
]:
350+
raise NotImplementedError()
351+
352+
@property
353+
def list_locations(
354+
self,
355+
) -> Callable[
356+
[locations_pb2.ListLocationsRequest],
357+
Union[
358+
locations_pb2.ListLocationsResponse,
359+
Awaitable[locations_pb2.ListLocationsResponse],
360+
],
361+
]:
362+
raise NotImplementedError()
363+
277364
@property
278365
def kind(self) -> str:
279366
raise NotImplementedError()

packages/google-cloud-network-connectivity/google/cloud/networkconnectivity_v1/services/hub_service/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

@@ -507,6 +510,192 @@ def delete_spoke(
507510
def close(self):
508511
self.grpc_channel.close()
509512

513+
@property
514+
def delete_operation(
515+
self,
516+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
517+
r"""Return a callable for the delete_operation method over gRPC."""
518+
# Generate a "stub function" on-the-fly which will actually make
519+
# the request.
520+
# gRPC handles serialization and deserialization, so we just need
521+
# to pass in the functions for each.
522+
if "delete_operation" not in self._stubs:
523+
self._stubs["delete_operation"] = self.grpc_channel.unary_unary(
524+
"/google.longrunning.Operations/DeleteOperation",
525+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
526+
response_deserializer=None,
527+
)
528+
return self._stubs["delete_operation"]
529+
530+
@property
531+
def cancel_operation(
532+
self,
533+
) -> Callable[[operations_pb2.CancelOperationRequest], None]:
534+
r"""Return a callable for the cancel_operation method over gRPC."""
535+
# Generate a "stub function" on-the-fly which will actually make
536+
# the request.
537+
# gRPC handles serialization and deserialization, so we just need
538+
# to pass in the functions for each.
539+
if "cancel_operation" not in self._stubs:
540+
self._stubs["cancel_operation"] = self.grpc_channel.unary_unary(
541+
"/google.longrunning.Operations/CancelOperation",
542+
request_serializer=operations_pb2.CancelOperationRequest.SerializeToString,
543+
response_deserializer=None,
544+
)
545+
return self._stubs["cancel_operation"]
546+
547+
@property
548+
def get_operation(
549+
self,
550+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
551+
r"""Return a callable for the get_operation method over gRPC."""
552+
# Generate a "stub function" on-the-fly which will actually make
553+
# the request.
554+
# gRPC handles serialization and deserialization, so we just need
555+
# to pass in the functions for each.
556+
if "get_operation" not in self._stubs:
557+
self._stubs["get_operation"] = self.grpc_channel.unary_unary(
558+
"/google.longrunning.Operations/GetOperation",
559+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
560+
response_deserializer=operations_pb2.Operation.FromString,
561+
)
562+
return self._stubs["get_operation"]
563+
564+
@property
565+
def list_operations(
566+
self,
567+
) -> Callable[
568+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
569+
]:
570+
r"""Return a callable for the list_operations method over gRPC."""
571+
# Generate a "stub function" on-the-fly which will actually make
572+
# the request.
573+
# gRPC handles serialization and deserialization, so we just need
574+
# to pass in the functions for each.
575+
if "list_operations" not in self._stubs:
576+
self._stubs["list_operations"] = self.grpc_channel.unary_unary(
577+
"/google.longrunning.Operations/ListOperations",
578+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
579+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
580+
)
581+
return self._stubs["list_operations"]
582+
583+
@property
584+
def list_locations(
585+
self,
586+
) -> Callable[
587+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
588+
]:
589+
r"""Return a callable for the list locations method over gRPC."""
590+
# Generate a "stub function" on-the-fly which will actually make
591+
# the request.
592+
# gRPC handles serialization and deserialization, so we just need
593+
# to pass in the functions for each.
594+
if "list_locations" not in self._stubs:
595+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
596+
"/google.cloud.location.Locations/ListLocations",
597+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
598+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
599+
)
600+
return self._stubs["list_locations"]
601+
602+
@property
603+
def get_location(
604+
self,
605+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
606+
r"""Return a callable for the list locations method over gRPC."""
607+
# Generate a "stub function" on-the-fly which will actually make
608+
# the request.
609+
# gRPC handles serialization and deserialization, so we just need
610+
# to pass in the functions for each.
611+
if "get_location" not in self._stubs:
612+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
613+
"/google.cloud.location.Locations/GetLocation",
614+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
615+
response_deserializer=locations_pb2.Location.FromString,
616+
)
617+
return self._stubs["get_location"]
618+
619+
@property
620+
def set_iam_policy(
621+
self,
622+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
623+
r"""Return a callable for the set iam policy method over gRPC.
624+
Sets the IAM access control policy on the specified
625+
function. Replaces any existing policy.
626+
Returns:
627+
Callable[[~.SetIamPolicyRequest],
628+
~.Policy]:
629+
A function that, when called, will call the underlying RPC
630+
on the server.
631+
"""
632+
# Generate a "stub function" on-the-fly which will actually make
633+
# the request.
634+
# gRPC handles serialization and deserialization, so we just need
635+
# to pass in the functions for each.
636+
if "set_iam_policy" not in self._stubs:
637+
self._stubs["set_iam_policy"] = self.grpc_channel.unary_unary(
638+
"/google.iam.v1.IAMPolicy/SetIamPolicy",
639+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
640+
response_deserializer=policy_pb2.Policy.FromString,
641+
)
642+
return self._stubs["set_iam_policy"]
643+
644+
@property
645+
def get_iam_policy(
646+
self,
647+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
648+
r"""Return a callable for the get iam policy method over gRPC.
649+
Gets the IAM access control policy for a function.
650+
Returns an empty policy if the function exists and does
651+
not have a policy set.
652+
Returns:
653+
Callable[[~.GetIamPolicyRequest],
654+
~.Policy]:
655+
A function that, when called, will call the underlying RPC
656+
on the server.
657+
"""
658+
# Generate a "stub function" on-the-fly which will actually make
659+
# the request.
660+
# gRPC handles serialization and deserialization, so we just need
661+
# to pass in the functions for each.
662+
if "get_iam_policy" not in self._stubs:
663+
self._stubs["get_iam_policy"] = self.grpc_channel.unary_unary(
664+
"/google.iam.v1.IAMPolicy/GetIamPolicy",
665+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
666+
response_deserializer=policy_pb2.Policy.FromString,
667+
)
668+
return self._stubs["get_iam_policy"]
669+
670+
@property
671+
def test_iam_permissions(
672+
self,
673+
) -> Callable[
674+
[iam_policy_pb2.TestIamPermissionsRequest],
675+
iam_policy_pb2.TestIamPermissionsResponse,
676+
]:
677+
r"""Return a callable for the test iam permissions method over gRPC.
678+
Tests the specified permissions against the IAM access control
679+
policy for a function. If the function does not exist, this will
680+
return an empty set of permissions, not a NOT_FOUND error.
681+
Returns:
682+
Callable[[~.TestIamPermissionsRequest],
683+
~.TestIamPermissionsResponse]:
684+
A function that, when called, will call the underlying RPC
685+
on the server.
686+
"""
687+
# Generate a "stub function" on-the-fly which will actually make
688+
# the request.
689+
# gRPC handles serialization and deserialization, so we just need
690+
# to pass in the functions for each.
691+
if "test_iam_permissions" not in self._stubs:
692+
self._stubs["test_iam_permissions"] = self.grpc_channel.unary_unary(
693+
"/google.iam.v1.IAMPolicy/TestIamPermissions",
694+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
695+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
696+
)
697+
return self._stubs["test_iam_permissions"]
698+
510699
@property
511700
def kind(self) -> str:
512701
return "grpc"

0 commit comments

Comments
 (0)