Skip to content

Commit ea7b2ed

Browse files
chore: Reformatting (#350)
* chore: Reformatting PiperOrigin-RevId: 511116336 Source-Link: googleapis/googleapis@af2f5da Source-Link: googleapis/googleapis-gen@9c6068e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWM2MDY4ZTg4MjFmMDcxOThlZDZmMDZlMjk0ZjlkMjdiMTYwZTY0NSJ9 * 🦉 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 c7200c5 commit ea7b2ed

File tree

6 files changed

+397
-397
lines changed

6 files changed

+397
-397
lines changed

packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/async_client.py

Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,92 @@ async def sample_get_server_config():
24922492
# Done; return the response.
24932493
return response
24942494

2495+
async def get_json_web_keys(
2496+
self,
2497+
request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None,
2498+
*,
2499+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2500+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2501+
metadata: Sequence[Tuple[str, str]] = (),
2502+
) -> cluster_service.GetJSONWebKeysResponse:
2503+
r"""Gets the public component of the cluster signing keys
2504+
in JSON Web Key format.
2505+
This API is not yet intended for general use, and is not
2506+
available for all clusters.
2507+
2508+
.. code-block:: python
2509+
2510+
# This snippet has been automatically generated and should be regarded as a
2511+
# code template only.
2512+
# It will require modifications to work:
2513+
# - It may require correct/in-range values for request initialization.
2514+
# - It may require specifying regional endpoints when creating the service
2515+
# client as shown in:
2516+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2517+
from google.cloud import container_v1beta1
2518+
2519+
async def sample_get_json_web_keys():
2520+
# Create a client
2521+
client = container_v1beta1.ClusterManagerAsyncClient()
2522+
2523+
# Initialize request argument(s)
2524+
request = container_v1beta1.GetJSONWebKeysRequest(
2525+
)
2526+
2527+
# Make the request
2528+
response = await client.get_json_web_keys(request=request)
2529+
2530+
# Handle the response
2531+
print(response)
2532+
2533+
Args:
2534+
request (Optional[Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]]):
2535+
The request object. GetJSONWebKeysRequest gets the
2536+
public component of the keys used by the cluster to sign
2537+
token requests. This will be the jwks_uri for the
2538+
discover document returned by getOpenIDConfig. See the
2539+
OpenID Connect Discovery 1.0 specification for details.
2540+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2541+
should be retried.
2542+
timeout (float): The timeout for this request.
2543+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2544+
sent along with the request as metadata.
2545+
2546+
Returns:
2547+
google.cloud.container_v1beta1.types.GetJSONWebKeysResponse:
2548+
GetJSONWebKeysResponse is a valid
2549+
JSON Web Key Set as specififed in rfc
2550+
7517
2551+
2552+
"""
2553+
# Create or coerce a protobuf request object.
2554+
request = cluster_service.GetJSONWebKeysRequest(request)
2555+
2556+
# Wrap the RPC method; this adds retry and timeout information,
2557+
# and friendly error handling.
2558+
rpc = gapic_v1.method_async.wrap_method(
2559+
self._client._transport.get_json_web_keys,
2560+
default_timeout=None,
2561+
client_info=DEFAULT_CLIENT_INFO,
2562+
)
2563+
2564+
# Certain fields should be provided within the metadata header;
2565+
# add these here.
2566+
metadata = tuple(metadata) + (
2567+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
2568+
)
2569+
2570+
# Send the request.
2571+
response = await rpc(
2572+
request,
2573+
retry=retry,
2574+
timeout=timeout,
2575+
metadata=metadata,
2576+
)
2577+
2578+
# Done; return the response.
2579+
return response
2580+
24952581
async def list_node_pools(
24962582
self,
24972583
request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None,
@@ -2633,92 +2719,6 @@ async def sample_list_node_pools():
26332719
# Done; return the response.
26342720
return response
26352721

2636-
async def get_json_web_keys(
2637-
self,
2638-
request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None,
2639-
*,
2640-
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2641-
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2642-
metadata: Sequence[Tuple[str, str]] = (),
2643-
) -> cluster_service.GetJSONWebKeysResponse:
2644-
r"""Gets the public component of the cluster signing keys
2645-
in JSON Web Key format.
2646-
This API is not yet intended for general use, and is not
2647-
available for all clusters.
2648-
2649-
.. code-block:: python
2650-
2651-
# This snippet has been automatically generated and should be regarded as a
2652-
# code template only.
2653-
# It will require modifications to work:
2654-
# - It may require correct/in-range values for request initialization.
2655-
# - It may require specifying regional endpoints when creating the service
2656-
# client as shown in:
2657-
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2658-
from google.cloud import container_v1beta1
2659-
2660-
async def sample_get_json_web_keys():
2661-
# Create a client
2662-
client = container_v1beta1.ClusterManagerAsyncClient()
2663-
2664-
# Initialize request argument(s)
2665-
request = container_v1beta1.GetJSONWebKeysRequest(
2666-
)
2667-
2668-
# Make the request
2669-
response = await client.get_json_web_keys(request=request)
2670-
2671-
# Handle the response
2672-
print(response)
2673-
2674-
Args:
2675-
request (Optional[Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]]):
2676-
The request object. GetJSONWebKeysRequest gets the
2677-
public component of the keys used by the cluster to sign
2678-
token requests. This will be the jwks_uri for the
2679-
discover document returned by getOpenIDConfig. See the
2680-
OpenID Connect Discovery 1.0 specification for details.
2681-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2682-
should be retried.
2683-
timeout (float): The timeout for this request.
2684-
metadata (Sequence[Tuple[str, str]]): Strings which should be
2685-
sent along with the request as metadata.
2686-
2687-
Returns:
2688-
google.cloud.container_v1beta1.types.GetJSONWebKeysResponse:
2689-
GetJSONWebKeysResponse is a valid
2690-
JSON Web Key Set as specififed in rfc
2691-
7517
2692-
2693-
"""
2694-
# Create or coerce a protobuf request object.
2695-
request = cluster_service.GetJSONWebKeysRequest(request)
2696-
2697-
# Wrap the RPC method; this adds retry and timeout information,
2698-
# and friendly error handling.
2699-
rpc = gapic_v1.method_async.wrap_method(
2700-
self._client._transport.get_json_web_keys,
2701-
default_timeout=None,
2702-
client_info=DEFAULT_CLIENT_INFO,
2703-
)
2704-
2705-
# Certain fields should be provided within the metadata header;
2706-
# add these here.
2707-
metadata = tuple(metadata) + (
2708-
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
2709-
)
2710-
2711-
# Send the request.
2712-
response = await rpc(
2713-
request,
2714-
retry=retry,
2715-
timeout=timeout,
2716-
metadata=metadata,
2717-
)
2718-
2719-
# Done; return the response.
2720-
return response
2721-
27222722
async def get_node_pool(
27232723
self,
27242724
request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None,

packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/client.py

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,6 +2659,93 @@ def sample_get_server_config():
26592659
# Done; return the response.
26602660
return response
26612661

2662+
def get_json_web_keys(
2663+
self,
2664+
request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None,
2665+
*,
2666+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2667+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2668+
metadata: Sequence[Tuple[str, str]] = (),
2669+
) -> cluster_service.GetJSONWebKeysResponse:
2670+
r"""Gets the public component of the cluster signing keys
2671+
in JSON Web Key format.
2672+
This API is not yet intended for general use, and is not
2673+
available for all clusters.
2674+
2675+
.. code-block:: python
2676+
2677+
# This snippet has been automatically generated and should be regarded as a
2678+
# code template only.
2679+
# It will require modifications to work:
2680+
# - It may require correct/in-range values for request initialization.
2681+
# - It may require specifying regional endpoints when creating the service
2682+
# client as shown in:
2683+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2684+
from google.cloud import container_v1beta1
2685+
2686+
def sample_get_json_web_keys():
2687+
# Create a client
2688+
client = container_v1beta1.ClusterManagerClient()
2689+
2690+
# Initialize request argument(s)
2691+
request = container_v1beta1.GetJSONWebKeysRequest(
2692+
)
2693+
2694+
# Make the request
2695+
response = client.get_json_web_keys(request=request)
2696+
2697+
# Handle the response
2698+
print(response)
2699+
2700+
Args:
2701+
request (Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]):
2702+
The request object. GetJSONWebKeysRequest gets the
2703+
public component of the keys used by the cluster to sign
2704+
token requests. This will be the jwks_uri for the
2705+
discover document returned by getOpenIDConfig. See the
2706+
OpenID Connect Discovery 1.0 specification for details.
2707+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2708+
should be retried.
2709+
timeout (float): The timeout for this request.
2710+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2711+
sent along with the request as metadata.
2712+
2713+
Returns:
2714+
google.cloud.container_v1beta1.types.GetJSONWebKeysResponse:
2715+
GetJSONWebKeysResponse is a valid
2716+
JSON Web Key Set as specififed in rfc
2717+
7517
2718+
2719+
"""
2720+
# Create or coerce a protobuf request object.
2721+
# Minor optimization to avoid making a copy if the user passes
2722+
# in a cluster_service.GetJSONWebKeysRequest.
2723+
# There's no risk of modifying the input as we've already verified
2724+
# there are no flattened fields.
2725+
if not isinstance(request, cluster_service.GetJSONWebKeysRequest):
2726+
request = cluster_service.GetJSONWebKeysRequest(request)
2727+
2728+
# Wrap the RPC method; this adds retry and timeout information,
2729+
# and friendly error handling.
2730+
rpc = self._transport._wrapped_methods[self._transport.get_json_web_keys]
2731+
2732+
# Certain fields should be provided within the metadata header;
2733+
# add these here.
2734+
metadata = tuple(metadata) + (
2735+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
2736+
)
2737+
2738+
# Send the request.
2739+
response = rpc(
2740+
request,
2741+
retry=retry,
2742+
timeout=timeout,
2743+
metadata=metadata,
2744+
)
2745+
2746+
# Done; return the response.
2747+
return response
2748+
26622749
def list_node_pools(
26632750
self,
26642751
request: Optional[Union[cluster_service.ListNodePoolsRequest, dict]] = None,
@@ -2790,93 +2877,6 @@ def sample_list_node_pools():
27902877
# Done; return the response.
27912878
return response
27922879

2793-
def get_json_web_keys(
2794-
self,
2795-
request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None,
2796-
*,
2797-
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2798-
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2799-
metadata: Sequence[Tuple[str, str]] = (),
2800-
) -> cluster_service.GetJSONWebKeysResponse:
2801-
r"""Gets the public component of the cluster signing keys
2802-
in JSON Web Key format.
2803-
This API is not yet intended for general use, and is not
2804-
available for all clusters.
2805-
2806-
.. code-block:: python
2807-
2808-
# This snippet has been automatically generated and should be regarded as a
2809-
# code template only.
2810-
# It will require modifications to work:
2811-
# - It may require correct/in-range values for request initialization.
2812-
# - It may require specifying regional endpoints when creating the service
2813-
# client as shown in:
2814-
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2815-
from google.cloud import container_v1beta1
2816-
2817-
def sample_get_json_web_keys():
2818-
# Create a client
2819-
client = container_v1beta1.ClusterManagerClient()
2820-
2821-
# Initialize request argument(s)
2822-
request = container_v1beta1.GetJSONWebKeysRequest(
2823-
)
2824-
2825-
# Make the request
2826-
response = client.get_json_web_keys(request=request)
2827-
2828-
# Handle the response
2829-
print(response)
2830-
2831-
Args:
2832-
request (Union[google.cloud.container_v1beta1.types.GetJSONWebKeysRequest, dict]):
2833-
The request object. GetJSONWebKeysRequest gets the
2834-
public component of the keys used by the cluster to sign
2835-
token requests. This will be the jwks_uri for the
2836-
discover document returned by getOpenIDConfig. See the
2837-
OpenID Connect Discovery 1.0 specification for details.
2838-
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2839-
should be retried.
2840-
timeout (float): The timeout for this request.
2841-
metadata (Sequence[Tuple[str, str]]): Strings which should be
2842-
sent along with the request as metadata.
2843-
2844-
Returns:
2845-
google.cloud.container_v1beta1.types.GetJSONWebKeysResponse:
2846-
GetJSONWebKeysResponse is a valid
2847-
JSON Web Key Set as specififed in rfc
2848-
7517
2849-
2850-
"""
2851-
# Create or coerce a protobuf request object.
2852-
# Minor optimization to avoid making a copy if the user passes
2853-
# in a cluster_service.GetJSONWebKeysRequest.
2854-
# There's no risk of modifying the input as we've already verified
2855-
# there are no flattened fields.
2856-
if not isinstance(request, cluster_service.GetJSONWebKeysRequest):
2857-
request = cluster_service.GetJSONWebKeysRequest(request)
2858-
2859-
# Wrap the RPC method; this adds retry and timeout information,
2860-
# and friendly error handling.
2861-
rpc = self._transport._wrapped_methods[self._transport.get_json_web_keys]
2862-
2863-
# Certain fields should be provided within the metadata header;
2864-
# add these here.
2865-
metadata = tuple(metadata) + (
2866-
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
2867-
)
2868-
2869-
# Send the request.
2870-
response = rpc(
2871-
request,
2872-
retry=retry,
2873-
timeout=timeout,
2874-
metadata=metadata,
2875-
)
2876-
2877-
# Done; return the response.
2878-
return response
2879-
28802880
def get_node_pool(
28812881
self,
28822882
request: Optional[Union[cluster_service.GetNodePoolRequest, dict]] = None,

0 commit comments

Comments
 (0)