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

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#67)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 24, 2021
1 parent b747165 commit 39ee308
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
62 changes: 31 additions & 31 deletions google/cloud/apigateway_v1/services/api_gateway_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from distutils import util
import os
import re
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
Expand Down Expand Up @@ -432,7 +432,7 @@ def __init__(

def list_gateways(
self,
request: apigateway.ListGatewaysRequest = None,
request: Union[apigateway.ListGatewaysRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -442,7 +442,7 @@ def list_gateways(
r"""Lists Gateways in a given project and location.
Args:
request (google.cloud.apigateway_v1.types.ListGatewaysRequest):
request (Union[google.cloud.apigateway_v1.types.ListGatewaysRequest, dict]):
The request object. Request message for
ApiGatewayService.ListGateways
parent (str):
Expand Down Expand Up @@ -512,7 +512,7 @@ def list_gateways(

def get_gateway(
self,
request: apigateway.GetGatewayRequest = None,
request: Union[apigateway.GetGatewayRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -522,7 +522,7 @@ def get_gateway(
r"""Gets details of a single Gateway.
Args:
request (google.cloud.apigateway_v1.types.GetGatewayRequest):
request (Union[google.cloud.apigateway_v1.types.GetGatewayRequest, dict]):
The request object. Request message for
ApiGatewayService.GetGateway
name (str):
Expand Down Expand Up @@ -587,7 +587,7 @@ def get_gateway(

def create_gateway(
self,
request: apigateway.CreateGatewayRequest = None,
request: Union[apigateway.CreateGatewayRequest, dict] = None,
*,
parent: str = None,
gateway: apigateway.Gateway = None,
Expand All @@ -600,7 +600,7 @@ def create_gateway(
location.
Args:
request (google.cloud.apigateway_v1.types.CreateGatewayRequest):
request (Union[google.cloud.apigateway_v1.types.CreateGatewayRequest, dict]):
The request object. Request message for
ApiGatewayService.CreateGateway
parent (str):
Expand Down Expand Up @@ -690,7 +690,7 @@ def create_gateway(

def update_gateway(
self,
request: apigateway.UpdateGatewayRequest = None,
request: Union[apigateway.UpdateGatewayRequest, dict] = None,
*,
gateway: apigateway.Gateway = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -701,7 +701,7 @@ def update_gateway(
r"""Updates the parameters of a single Gateway.
Args:
request (google.cloud.apigateway_v1.types.UpdateGatewayRequest):
request (Union[google.cloud.apigateway_v1.types.UpdateGatewayRequest, dict]):
The request object. Request message for
ApiGatewayService.UpdateGateway
gateway (google.cloud.apigateway_v1.types.Gateway):
Expand Down Expand Up @@ -787,7 +787,7 @@ def update_gateway(

def delete_gateway(
self,
request: apigateway.DeleteGatewayRequest = None,
request: Union[apigateway.DeleteGatewayRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -797,7 +797,7 @@ def delete_gateway(
r"""Deletes a single Gateway.
Args:
request (google.cloud.apigateway_v1.types.DeleteGatewayRequest):
request (Union[google.cloud.apigateway_v1.types.DeleteGatewayRequest, dict]):
The request object. Request message for
ApiGatewayService.DeleteGateway
name (str):
Expand Down Expand Up @@ -879,7 +879,7 @@ def delete_gateway(

def list_apis(
self,
request: apigateway.ListApisRequest = None,
request: Union[apigateway.ListApisRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -889,7 +889,7 @@ def list_apis(
r"""Lists Apis in a given project and location.
Args:
request (google.cloud.apigateway_v1.types.ListApisRequest):
request (Union[google.cloud.apigateway_v1.types.ListApisRequest, dict]):
The request object. Request message for
ApiGatewayService.ListApis
parent (str):
Expand Down Expand Up @@ -959,7 +959,7 @@ def list_apis(

def get_api(
self,
request: apigateway.GetApiRequest = None,
request: Union[apigateway.GetApiRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -969,7 +969,7 @@ def get_api(
r"""Gets details of a single Api.
Args:
request (google.cloud.apigateway_v1.types.GetApiRequest):
request (Union[google.cloud.apigateway_v1.types.GetApiRequest, dict]):
The request object. Request message for
ApiGatewayService.GetApi
name (str):
Expand Down Expand Up @@ -1030,7 +1030,7 @@ def get_api(

def create_api(
self,
request: apigateway.CreateApiRequest = None,
request: Union[apigateway.CreateApiRequest, dict] = None,
*,
parent: str = None,
api: apigateway.Api = None,
Expand All @@ -1042,7 +1042,7 @@ def create_api(
r"""Creates a new Api in a given project and location.
Args:
request (google.cloud.apigateway_v1.types.CreateApiRequest):
request (Union[google.cloud.apigateway_v1.types.CreateApiRequest, dict]):
The request object. Request message for
ApiGatewayService.CreateApi
parent (str):
Expand Down Expand Up @@ -1131,7 +1131,7 @@ def create_api(

def update_api(
self,
request: apigateway.UpdateApiRequest = None,
request: Union[apigateway.UpdateApiRequest, dict] = None,
*,
api: apigateway.Api = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -1142,7 +1142,7 @@ def update_api(
r"""Updates the parameters of a single Api.
Args:
request (google.cloud.apigateway_v1.types.UpdateApiRequest):
request (Union[google.cloud.apigateway_v1.types.UpdateApiRequest, dict]):
The request object. Request message for
ApiGatewayService.UpdateApi
api (google.cloud.apigateway_v1.types.Api):
Expand Down Expand Up @@ -1225,7 +1225,7 @@ def update_api(

def delete_api(
self,
request: apigateway.DeleteApiRequest = None,
request: Union[apigateway.DeleteApiRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1235,7 +1235,7 @@ def delete_api(
r"""Deletes a single Api.
Args:
request (google.cloud.apigateway_v1.types.DeleteApiRequest):
request (Union[google.cloud.apigateway_v1.types.DeleteApiRequest, dict]):
The request object. Request message for
ApiGatewayService.DeleteApi
name (str):
Expand Down Expand Up @@ -1317,7 +1317,7 @@ def delete_api(

def list_api_configs(
self,
request: apigateway.ListApiConfigsRequest = None,
request: Union[apigateway.ListApiConfigsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1327,7 +1327,7 @@ def list_api_configs(
r"""Lists ApiConfigs in a given project and location.
Args:
request (google.cloud.apigateway_v1.types.ListApiConfigsRequest):
request (Union[google.cloud.apigateway_v1.types.ListApiConfigsRequest, dict]):
The request object. Request message for
ApiGatewayService.ListApiConfigs
parent (str):
Expand Down Expand Up @@ -1397,7 +1397,7 @@ def list_api_configs(

def get_api_config(
self,
request: apigateway.GetApiConfigRequest = None,
request: Union[apigateway.GetApiConfigRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1407,7 +1407,7 @@ def get_api_config(
r"""Gets details of a single ApiConfig.
Args:
request (google.cloud.apigateway_v1.types.GetApiConfigRequest):
request (Union[google.cloud.apigateway_v1.types.GetApiConfigRequest, dict]):
The request object. Request message for
ApiGatewayService.GetApiConfig
name (str):
Expand Down Expand Up @@ -1469,7 +1469,7 @@ def get_api_config(

def create_api_config(
self,
request: apigateway.CreateApiConfigRequest = None,
request: Union[apigateway.CreateApiConfigRequest, dict] = None,
*,
parent: str = None,
api_config: apigateway.ApiConfig = None,
Expand All @@ -1482,7 +1482,7 @@ def create_api_config(
location.
Args:
request (google.cloud.apigateway_v1.types.CreateApiConfigRequest):
request (Union[google.cloud.apigateway_v1.types.CreateApiConfigRequest, dict]):
The request object. Request message for
ApiGatewayService.CreateApiConfig
parent (str):
Expand Down Expand Up @@ -1570,7 +1570,7 @@ def create_api_config(

def update_api_config(
self,
request: apigateway.UpdateApiConfigRequest = None,
request: Union[apigateway.UpdateApiConfigRequest, dict] = None,
*,
api_config: apigateway.ApiConfig = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -1581,7 +1581,7 @@ def update_api_config(
r"""Updates the parameters of a single ApiConfig.
Args:
request (google.cloud.apigateway_v1.types.UpdateApiConfigRequest):
request (Union[google.cloud.apigateway_v1.types.UpdateApiConfigRequest, dict]):
The request object. Request message for
ApiGatewayService.UpdateApiConfig
api_config (google.cloud.apigateway_v1.types.ApiConfig):
Expand Down Expand Up @@ -1665,7 +1665,7 @@ def update_api_config(

def delete_api_config(
self,
request: apigateway.DeleteApiConfigRequest = None,
request: Union[apigateway.DeleteApiConfigRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1675,7 +1675,7 @@ def delete_api_config(
r"""Deletes a single ApiConfig.
Args:
request (google.cloud.apigateway_v1.types.DeleteApiConfigRequest):
request (Union[google.cloud.apigateway_v1.types.DeleteApiConfigRequest, dict]):
The request object. Request message for
ApiGatewayService.DeleteApiConfig
name (str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
32 changes: 16 additions & 16 deletions scripts/fixup_apigateway_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ def partition(
class apigatewayCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_api': ('parent', 'api_id', 'api', ),
'create_api_config': ('parent', 'api_config_id', 'api_config', ),
'create_gateway': ('parent', 'gateway_id', 'gateway', ),
'delete_api': ('name', ),
'delete_api_config': ('name', ),
'delete_gateway': ('name', ),
'get_api': ('name', ),
'get_api_config': ('name', 'view', ),
'get_gateway': ('name', ),
'list_api_configs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_apis': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_gateways': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'update_api': ('api', 'update_mask', ),
'update_api_config': ('api_config', 'update_mask', ),
'update_gateway': ('gateway', 'update_mask', ),
'create_api': ('parent', 'api_id', 'api', ),
'create_api_config': ('parent', 'api_config_id', 'api_config', ),
'create_gateway': ('parent', 'gateway_id', 'gateway', ),
'delete_api': ('name', ),
'delete_api_config': ('name', ),
'delete_gateway': ('name', ),
'get_api': ('name', ),
'get_api_config': ('name', 'view', ),
'get_gateway': ('name', ),
'list_api_configs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_apis': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_gateways': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'update_api': ('api', 'update_mask', ),
'update_api_config': ('api_config', 'update_mask', ),
'update_gateway': ('gateway', 'update_mask', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -72,7 +72,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
return updated

kwargs, ctrl_kwargs = partition(
lambda a: not a.keyword.value in self.CTRL_PARAMS,
lambda a: a.keyword.value not in self.CTRL_PARAMS,
kwargs
)

Expand Down

0 comments on commit 39ee308

Please sign in to comment.