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

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: use gapic-generator-python 0.51.2 (#29)
- [ ] 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 32e25e5 commit 73e18c4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
30 changes: 15 additions & 15 deletions google/cloud/data_fusion_v1/services/data_fusion/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 list_available_versions(
self,
request: datafusion.ListAvailableVersionsRequest = None,
request: Union[datafusion.ListAvailableVersionsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -369,7 +369,7 @@ def list_available_versions(
the specified project and location.
Args:
request (google.cloud.data_fusion_v1.types.ListAvailableVersionsRequest):
request (Union[google.cloud.data_fusion_v1.types.ListAvailableVersionsRequest, dict]):
The request object. Request message for the list
available versions request.
parent (str):
Expand Down Expand Up @@ -441,7 +441,7 @@ def list_available_versions(

def list_instances(
self,
request: datafusion.ListInstancesRequest = None,
request: Union[datafusion.ListInstancesRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -451,7 +451,7 @@ def list_instances(
and location.
Args:
request (google.cloud.data_fusion_v1.types.ListInstancesRequest):
request (Union[google.cloud.data_fusion_v1.types.ListInstancesRequest, dict]):
The request object. Request message for listing Data
Fusion instances.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -501,7 +501,7 @@ def list_instances(

def get_instance(
self,
request: datafusion.GetInstanceRequest = None,
request: Union[datafusion.GetInstanceRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -510,7 +510,7 @@ def get_instance(
r"""Gets details of a single Data Fusion instance.
Args:
request (google.cloud.data_fusion_v1.types.GetInstanceRequest):
request (Union[google.cloud.data_fusion_v1.types.GetInstanceRequest, dict]):
The request object. Request message for getting details
about a Data Fusion instance.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -549,7 +549,7 @@ def get_instance(

def create_instance(
self,
request: datafusion.CreateInstanceRequest = None,
request: Union[datafusion.CreateInstanceRequest, dict] = None,
*,
parent: str = None,
instance: datafusion.Instance = None,
Expand All @@ -562,7 +562,7 @@ def create_instance(
project and location.
Args:
request (google.cloud.data_fusion_v1.types.CreateInstanceRequest):
request (Union[google.cloud.data_fusion_v1.types.CreateInstanceRequest, dict]):
The request object. Request message for creating a Data
Fusion instance.
parent (str):
Expand Down Expand Up @@ -649,7 +649,7 @@ def create_instance(

def delete_instance(
self,
request: datafusion.DeleteInstanceRequest = None,
request: Union[datafusion.DeleteInstanceRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -659,7 +659,7 @@ def delete_instance(
r"""Deletes a single Date Fusion instance.
Args:
request (google.cloud.data_fusion_v1.types.DeleteInstanceRequest):
request (Union[google.cloud.data_fusion_v1.types.DeleteInstanceRequest, dict]):
The request object. Request message for deleting a Data
Fusion instance.
name (str):
Expand Down Expand Up @@ -742,7 +742,7 @@ def delete_instance(

def update_instance(
self,
request: datafusion.UpdateInstanceRequest = None,
request: Union[datafusion.UpdateInstanceRequest, dict] = None,
*,
instance: datafusion.Instance = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -753,7 +753,7 @@ def update_instance(
r"""Updates a single Data Fusion instance.
Args:
request (google.cloud.data_fusion_v1.types.UpdateInstanceRequest):
request (Union[google.cloud.data_fusion_v1.types.UpdateInstanceRequest, dict]):
The request object.
instance (google.cloud.data_fusion_v1.types.Instance):
The instance resource that replaces
Expand Down Expand Up @@ -844,7 +844,7 @@ def update_instance(

def restart_instance(
self,
request: datafusion.RestartInstanceRequest = None,
request: Union[datafusion.RestartInstanceRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -854,7 +854,7 @@ def restart_instance(
At the end of an operation instance is fully restarted.
Args:
request (google.cloud.data_fusion_v1.types.RestartInstanceRequest):
request (Union[google.cloud.data_fusion_v1.types.RestartInstanceRequest, dict]):
The request object. Request message for restarting a
Data Fusion instance.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
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
16 changes: 8 additions & 8 deletions scripts/fixup_data_fusion_v1_keywords.py
Expand Up @@ -39,13 +39,13 @@ def partition(
class data_fusionCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_instance': ('parent', 'instance_id', 'instance', ),
'delete_instance': ('name', ),
'get_instance': ('name', ),
'list_available_versions': ('parent', 'page_size', 'page_token', 'latest_patch_only', ),
'list_instances': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'restart_instance': ('name', ),
'update_instance': ('instance', 'update_mask', ),
'create_instance': ('parent', 'instance_id', 'instance', ),
'delete_instance': ('name', ),
'get_instance': ('name', ),
'list_available_versions': ('parent', 'page_size', 'page_token', 'latest_patch_only', ),
'list_instances': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'restart_instance': ('name', ),
'update_instance': ('instance', 'update_mask', ),
}

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

Please sign in to comment.