Skip to content

Commit 8d2dbf1

Browse files
fix: Add service_yaml parameters to baremetalsolution_py_gapic (#89)
* fix: Add service_yaml_parameters to `baremetalsolution_py_gapic` PiperOrigin-RevId: 513567256 Source-Link: googleapis/googleapis@4007192 Source-Link: googleapis/googleapis-gen@c26f30f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzI2ZjMwZmQzYzY1OTRlNGYwN2M2YzNjNDMwZDI1OGY5OTI5YTdkYyJ9 * 🦉 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 f47b3a2 commit 8d2dbf1

File tree

14 files changed

+925
-0
lines changed

14 files changed

+925
-0
lines changed

packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444

4545
from google.api_core import operation # type: ignore
4646
from google.api_core import operation_async # type: ignore
47+
from google.cloud.location import locations_pb2 # type: ignore
48+
from google.iam.v1 import iam_policy_pb2 # type: ignore
49+
from google.iam.v1 import policy_pb2 # type: ignore
50+
from google.longrunning import operations_pb2
4751
from google.protobuf import field_mask_pb2 # type: ignore
4852
from google.protobuf import timestamp_pb2 # type: ignore
4953

@@ -2539,6 +2543,114 @@ async def sample_update_nfs_share():
25392543
# Done; return the response.
25402544
return response
25412545

2546+
async def get_location(
2547+
self,
2548+
request: Optional[locations_pb2.GetLocationRequest] = None,
2549+
*,
2550+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2551+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2552+
metadata: Sequence[Tuple[str, str]] = (),
2553+
) -> locations_pb2.Location:
2554+
r"""Gets information about a location.
2555+
2556+
Args:
2557+
request (:class:`~.location_pb2.GetLocationRequest`):
2558+
The request object. Request message for
2559+
`GetLocation` method.
2560+
retry (google.api_core.retry.Retry): Designation of what errors,
2561+
if any, should be retried.
2562+
timeout (float): The timeout for this request.
2563+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2564+
sent along with the request as metadata.
2565+
Returns:
2566+
~.location_pb2.Location:
2567+
Location object.
2568+
"""
2569+
# Create or coerce a protobuf request object.
2570+
# The request isn't a proto-plus wrapped type,
2571+
# so it must be constructed via keyword expansion.
2572+
if isinstance(request, dict):
2573+
request = locations_pb2.GetLocationRequest(**request)
2574+
2575+
# Wrap the RPC method; this adds retry and timeout information,
2576+
# and friendly error handling.
2577+
rpc = gapic_v1.method.wrap_method(
2578+
self._client._transport.get_location,
2579+
default_timeout=None,
2580+
client_info=DEFAULT_CLIENT_INFO,
2581+
)
2582+
2583+
# Certain fields should be provided within the metadata header;
2584+
# add these here.
2585+
metadata = tuple(metadata) + (
2586+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2587+
)
2588+
2589+
# Send the request.
2590+
response = await rpc(
2591+
request,
2592+
retry=retry,
2593+
timeout=timeout,
2594+
metadata=metadata,
2595+
)
2596+
2597+
# Done; return the response.
2598+
return response
2599+
2600+
async def list_locations(
2601+
self,
2602+
request: Optional[locations_pb2.ListLocationsRequest] = None,
2603+
*,
2604+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2605+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2606+
metadata: Sequence[Tuple[str, str]] = (),
2607+
) -> locations_pb2.ListLocationsResponse:
2608+
r"""Lists information about the supported locations for this service.
2609+
2610+
Args:
2611+
request (:class:`~.location_pb2.ListLocationsRequest`):
2612+
The request object. Request message for
2613+
`ListLocations` method.
2614+
retry (google.api_core.retry.Retry): Designation of what errors,
2615+
if any, should be retried.
2616+
timeout (float): The timeout for this request.
2617+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2618+
sent along with the request as metadata.
2619+
Returns:
2620+
~.location_pb2.ListLocationsResponse:
2621+
Response message for ``ListLocations`` method.
2622+
"""
2623+
# Create or coerce a protobuf request object.
2624+
# The request isn't a proto-plus wrapped type,
2625+
# so it must be constructed via keyword expansion.
2626+
if isinstance(request, dict):
2627+
request = locations_pb2.ListLocationsRequest(**request)
2628+
2629+
# Wrap the RPC method; this adds retry and timeout information,
2630+
# and friendly error handling.
2631+
rpc = gapic_v1.method.wrap_method(
2632+
self._client._transport.list_locations,
2633+
default_timeout=None,
2634+
client_info=DEFAULT_CLIENT_INFO,
2635+
)
2636+
2637+
# Certain fields should be provided within the metadata header;
2638+
# add these here.
2639+
metadata = tuple(metadata) + (
2640+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2641+
)
2642+
2643+
# Send the request.
2644+
response = await rpc(
2645+
request,
2646+
retry=retry,
2647+
timeout=timeout,
2648+
metadata=metadata,
2649+
)
2650+
2651+
# Done; return the response.
2652+
return response
2653+
25422654
async def __aenter__(self):
25432655
return self
25442656

packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848

4949
from google.api_core import operation # type: ignore
5050
from google.api_core import operation_async # type: ignore
51+
from google.cloud.location import locations_pb2 # type: ignore
52+
from google.iam.v1 import iam_policy_pb2 # type: ignore
53+
from google.iam.v1 import policy_pb2 # type: ignore
54+
from google.longrunning import operations_pb2
5155
from google.protobuf import field_mask_pb2 # type: ignore
5256
from google.protobuf import timestamp_pb2 # type: ignore
5357

@@ -2879,6 +2883,114 @@ def __exit__(self, type, value, traceback):
28792883
"""
28802884
self.transport.close()
28812885

2886+
def get_location(
2887+
self,
2888+
request: Optional[locations_pb2.GetLocationRequest] = None,
2889+
*,
2890+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2891+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2892+
metadata: Sequence[Tuple[str, str]] = (),
2893+
) -> locations_pb2.Location:
2894+
r"""Gets information about a location.
2895+
2896+
Args:
2897+
request (:class:`~.location_pb2.GetLocationRequest`):
2898+
The request object. Request message for
2899+
`GetLocation` method.
2900+
retry (google.api_core.retry.Retry): Designation of what errors,
2901+
if any, should be retried.
2902+
timeout (float): The timeout for this request.
2903+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2904+
sent along with the request as metadata.
2905+
Returns:
2906+
~.location_pb2.Location:
2907+
Location object.
2908+
"""
2909+
# Create or coerce a protobuf request object.
2910+
# The request isn't a proto-plus wrapped type,
2911+
# so it must be constructed via keyword expansion.
2912+
if isinstance(request, dict):
2913+
request = locations_pb2.GetLocationRequest(**request)
2914+
2915+
# Wrap the RPC method; this adds retry and timeout information,
2916+
# and friendly error handling.
2917+
rpc = gapic_v1.method.wrap_method(
2918+
self._transport.get_location,
2919+
default_timeout=None,
2920+
client_info=DEFAULT_CLIENT_INFO,
2921+
)
2922+
2923+
# Certain fields should be provided within the metadata header;
2924+
# add these here.
2925+
metadata = tuple(metadata) + (
2926+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2927+
)
2928+
2929+
# Send the request.
2930+
response = rpc(
2931+
request,
2932+
retry=retry,
2933+
timeout=timeout,
2934+
metadata=metadata,
2935+
)
2936+
2937+
# Done; return the response.
2938+
return response
2939+
2940+
def list_locations(
2941+
self,
2942+
request: Optional[locations_pb2.ListLocationsRequest] = None,
2943+
*,
2944+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2945+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2946+
metadata: Sequence[Tuple[str, str]] = (),
2947+
) -> locations_pb2.ListLocationsResponse:
2948+
r"""Lists information about the supported locations for this service.
2949+
2950+
Args:
2951+
request (:class:`~.location_pb2.ListLocationsRequest`):
2952+
The request object. Request message for
2953+
`ListLocations` method.
2954+
retry (google.api_core.retry.Retry): Designation of what errors,
2955+
if any, should be retried.
2956+
timeout (float): The timeout for this request.
2957+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2958+
sent along with the request as metadata.
2959+
Returns:
2960+
~.location_pb2.ListLocationsResponse:
2961+
Response message for ``ListLocations`` method.
2962+
"""
2963+
# Create or coerce a protobuf request object.
2964+
# The request isn't a proto-plus wrapped type,
2965+
# so it must be constructed via keyword expansion.
2966+
if isinstance(request, dict):
2967+
request = locations_pb2.ListLocationsRequest(**request)
2968+
2969+
# Wrap the RPC method; this adds retry and timeout information,
2970+
# and friendly error handling.
2971+
rpc = gapic_v1.method.wrap_method(
2972+
self._transport.list_locations,
2973+
default_timeout=None,
2974+
client_info=DEFAULT_CLIENT_INFO,
2975+
)
2976+
2977+
# Certain fields should be provided within the metadata header;
2978+
# add these here.
2979+
metadata = tuple(metadata) + (
2980+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2981+
)
2982+
2983+
# Send the request.
2984+
response = rpc(
2985+
request,
2986+
retry=retry,
2987+
timeout=timeout,
2988+
metadata=metadata,
2989+
)
2990+
2991+
# Done; return the response.
2992+
return response
2993+
28822994

28832995
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
28842996
gapic_version=package_version.__version__

packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/base.py

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

@@ -429,6 +432,27 @@ def update_nfs_share(
429432
]:
430433
raise NotImplementedError()
431434

435+
@property
436+
def get_location(
437+
self,
438+
) -> Callable[
439+
[locations_pb2.GetLocationRequest],
440+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
441+
]:
442+
raise NotImplementedError()
443+
444+
@property
445+
def list_locations(
446+
self,
447+
) -> Callable[
448+
[locations_pb2.ListLocationsRequest],
449+
Union[
450+
locations_pb2.ListLocationsResponse,
451+
Awaitable[locations_pb2.ListLocationsResponse],
452+
],
453+
]:
454+
raise NotImplementedError()
455+
432456
@property
433457
def kind(self) -> str:
434458
raise NotImplementedError()

packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/grpc.py

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

@@ -780,6 +783,42 @@ def update_nfs_share(
780783
def close(self):
781784
self.grpc_channel.close()
782785

786+
@property
787+
def list_locations(
788+
self,
789+
) -> Callable[
790+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
791+
]:
792+
r"""Return a callable for the list locations method over gRPC."""
793+
# Generate a "stub function" on-the-fly which will actually make
794+
# the request.
795+
# gRPC handles serialization and deserialization, so we just need
796+
# to pass in the functions for each.
797+
if "list_locations" not in self._stubs:
798+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
799+
"/google.cloud.location.Locations/ListLocations",
800+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
801+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
802+
)
803+
return self._stubs["list_locations"]
804+
805+
@property
806+
def get_location(
807+
self,
808+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
809+
r"""Return a callable for the list locations method over gRPC."""
810+
# Generate a "stub function" on-the-fly which will actually make
811+
# the request.
812+
# gRPC handles serialization and deserialization, so we just need
813+
# to pass in the functions for each.
814+
if "get_location" not in self._stubs:
815+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
816+
"/google.cloud.location.Locations/GetLocation",
817+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
818+
response_deserializer=locations_pb2.Location.FromString,
819+
)
820+
return self._stubs["get_location"]
821+
783822
@property
784823
def kind(self) -> str:
785824
return "grpc"

packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/grpc_asyncio.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
from google.api_core import gapic_v1, grpc_helpers_async, operations_v1
2020
from google.auth import credentials as ga_credentials # type: ignore
2121
from google.auth.transport.grpc import SslCredentials # type: ignore
22+
from google.cloud.location import locations_pb2 # type: ignore
23+
from google.iam.v1 import iam_policy_pb2 # type: ignore
24+
from google.iam.v1 import policy_pb2 # type: ignore
2225
from google.longrunning import operations_pb2 # type: ignore
2326
import grpc # type: ignore
2427
from grpc.experimental import aio # type: ignore
@@ -809,5 +812,41 @@ def update_nfs_share(
809812
def close(self):
810813
return self.grpc_channel.close()
811814

815+
@property
816+
def list_locations(
817+
self,
818+
) -> Callable[
819+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
820+
]:
821+
r"""Return a callable for the list locations method over gRPC."""
822+
# Generate a "stub function" on-the-fly which will actually make
823+
# the request.
824+
# gRPC handles serialization and deserialization, so we just need
825+
# to pass in the functions for each.
826+
if "list_locations" not in self._stubs:
827+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
828+
"/google.cloud.location.Locations/ListLocations",
829+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
830+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
831+
)
832+
return self._stubs["list_locations"]
833+
834+
@property
835+
def get_location(
836+
self,
837+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
838+
r"""Return a callable for the list locations method over gRPC."""
839+
# Generate a "stub function" on-the-fly which will actually make
840+
# the request.
841+
# gRPC handles serialization and deserialization, so we just need
842+
# to pass in the functions for each.
843+
if "get_location" not in self._stubs:
844+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
845+
"/google.cloud.location.Locations/GetLocation",
846+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
847+
response_deserializer=locations_pb2.Location.FromString,
848+
)
849+
return self._stubs["get_location"]
850+
812851

813852
__all__ = ("BareMetalSolutionGrpcAsyncIOTransport",)

0 commit comments

Comments
 (0)