Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.51.2 (#67)
- [ ] Regenerate this pull request now.

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

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot committed Sep 24, 2021
1 parent b747165 commit 39ee308769c9d999acca90c5ac56e4cd5806c822
@@ -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
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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,
@@ -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):
@@ -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)
@@ -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.
@@ -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.
@@ -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:
@@ -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
)

0 comments on commit 39ee308

Please sign in to comment.