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 (#46)
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: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent 495c97a commit be61638
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions google/cloud/vpcaccess_v1/services/vpc_access_service/client.py
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 @@ -358,7 +358,7 @@ def __init__(

def create_connector(
self,
request: vpc_access.CreateConnectorRequest = None,
request: Union[vpc_access.CreateConnectorRequest, dict] = None,
*,
parent: str = None,
connector_id: str = None,
Expand All @@ -371,7 +371,7 @@ def create_connector(
operation.
Args:
request (google.cloud.vpcaccess_v1.types.CreateConnectorRequest):
request (Union[google.cloud.vpcaccess_v1.types.CreateConnectorRequest, dict]):
The request object. Request for creating a Serverless
VPC Access connector.
parent (str):
Expand Down Expand Up @@ -460,7 +460,7 @@ def create_connector(

def get_connector(
self,
request: vpc_access.GetConnectorRequest = None,
request: Union[vpc_access.GetConnectorRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -471,7 +471,7 @@ def get_connector(
resource does not exist.
Args:
request (google.cloud.vpcaccess_v1.types.GetConnectorRequest):
request (Union[google.cloud.vpcaccess_v1.types.GetConnectorRequest, dict]):
The request object. Request for getting a Serverless VPC
Access connector.
name (str):
Expand Down Expand Up @@ -532,7 +532,7 @@ def get_connector(

def list_connectors(
self,
request: vpc_access.ListConnectorsRequest = None,
request: Union[vpc_access.ListConnectorsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -542,7 +542,7 @@ def list_connectors(
r"""Lists Serverless VPC Access connectors.
Args:
request (google.cloud.vpcaccess_v1.types.ListConnectorsRequest):
request (Union[google.cloud.vpcaccess_v1.types.ListConnectorsRequest, dict]):
The request object. Request for listing Serverless VPC
Access connectors in a location.
parent (str):
Expand Down Expand Up @@ -612,7 +612,7 @@ def list_connectors(

def delete_connector(
self,
request: vpc_access.DeleteConnectorRequest = None,
request: Union[vpc_access.DeleteConnectorRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -623,7 +623,7 @@ def delete_connector(
the resource does not exist.
Args:
request (google.cloud.vpcaccess_v1.types.DeleteConnectorRequest):
request (Union[google.cloud.vpcaccess_v1.types.DeleteConnectorRequest, dict]):
The request object. Request for deleting a Serverless
VPC Access connector.
name (str):
Expand Down
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
Expand Up @@ -84,16 +84,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
Expand Up @@ -131,16 +131,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
10 changes: 5 additions & 5 deletions scripts/fixup_vpcaccess_v1_keywords.py
Expand Up @@ -39,10 +39,10 @@ def partition(
class vpcaccessCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_connector': ('parent', 'connector_id', 'connector', ),
'delete_connector': ('name', ),
'get_connector': ('name', ),
'list_connectors': ('parent', 'page_size', 'page_token', ),
'create_connector': ('parent', 'connector_id', 'connector', ),
'delete_connector': ('name', ),
'get_connector': ('name', ),
'list_connectors': ('parent', 'page_size', 'page_token', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -61,7 +61,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 be61638

Please sign in to comment.