Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.51.2 (#222)
- [ ] 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 390b16d commit fe024dbcc3075fd779358d434f37ec3ee3a0adf9
@@ -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
import warnings

@@ -396,7 +396,7 @@ def __init__(

def get_data_source(
self,
request: datatransfer.GetDataSourceRequest = None,
request: Union[datatransfer.GetDataSourceRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -407,7 +407,7 @@ def get_data_source(
settings, which can be used for UI rendering.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.GetDataSourceRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.GetDataSourceRequest, dict]):
The request object. A request to get data source info.
name (str):
Required. The field will contain name of the resource
@@ -471,7 +471,7 @@ def get_data_source(

def list_data_sources(
self,
request: datatransfer.ListDataSourcesRequest = None,
request: Union[datatransfer.ListDataSourcesRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -482,7 +482,7 @@ def list_data_sources(
settings, which can be used for UI rendering.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.ListDataSourcesRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.ListDataSourcesRequest, dict]):
The request object. Request to list supported data
sources and their data transfer settings.
parent (str):
@@ -554,7 +554,7 @@ def list_data_sources(

def create_transfer_config(
self,
request: datatransfer.CreateTransferConfigRequest = None,
request: Union[datatransfer.CreateTransferConfigRequest, dict] = None,
*,
parent: str = None,
transfer_config: transfer.TransferConfig = None,
@@ -565,7 +565,7 @@ def create_transfer_config(
r"""Creates a new data transfer configuration.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest, dict]):
The request object. A request to create a data transfer
configuration. If new credentials are needed for this
transfer configuration, an authorization code must be
@@ -651,7 +651,7 @@ def create_transfer_config(

def update_transfer_config(
self,
request: datatransfer.UpdateTransferConfigRequest = None,
request: Union[datatransfer.UpdateTransferConfigRequest, dict] = None,
*,
transfer_config: transfer.TransferConfig = None,
update_mask: field_mask_pb2.FieldMask = None,
@@ -663,7 +663,7 @@ def update_transfer_config(
All fields must be set, even if they are not updated.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest, dict]):
The request object. A request to update a transfer
configuration. To update the user id of the transfer
configuration, an authorization code needs to be
@@ -743,7 +743,7 @@ def update_transfer_config(

def delete_transfer_config(
self,
request: datatransfer.DeleteTransferConfigRequest = None,
request: Union[datatransfer.DeleteTransferConfigRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -754,7 +754,7 @@ def delete_transfer_config(
including any associated transfer runs and logs.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.DeleteTransferConfigRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferConfigRequest, dict]):
The request object. A request to delete data transfer
information. All associated transfer runs and log
messages will be deleted as well.
@@ -811,7 +811,7 @@ def delete_transfer_config(

def get_transfer_config(
self,
request: datatransfer.GetTransferConfigRequest = None,
request: Union[datatransfer.GetTransferConfigRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -821,7 +821,7 @@ def get_transfer_config(
r"""Returns information about a data transfer config.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.GetTransferConfigRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.GetTransferConfigRequest, dict]):
The request object. A request to get data transfer
information.
name (str):
@@ -890,7 +890,7 @@ def get_transfer_config(

def list_transfer_configs(
self,
request: datatransfer.ListTransferConfigsRequest = None,
request: Union[datatransfer.ListTransferConfigsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -901,7 +901,7 @@ def list_transfer_configs(
by a project in the specified location.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.ListTransferConfigsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferConfigsRequest, dict]):
The request object. A request to list data transfers
configured for a BigQuery project.
parent (str):
@@ -972,7 +972,7 @@ def list_transfer_configs(

def schedule_transfer_runs(
self,
request: datatransfer.ScheduleTransferRunsRequest = None,
request: Union[datatransfer.ScheduleTransferRunsRequest, dict] = None,
*,
parent: str = None,
start_time: timestamp_pb2.Timestamp = None,
@@ -988,7 +988,7 @@ def schedule_transfer_runs(
StartManualTransferRuns instead.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.ScheduleTransferRunsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.ScheduleTransferRunsRequest, dict]):
The request object. A request to schedule transfer runs
for a time range.
parent (str):
@@ -1073,7 +1073,7 @@ def schedule_transfer_runs(

def start_manual_transfer_runs(
self,
request: datatransfer.StartManualTransferRunsRequest = None,
request: Union[datatransfer.StartManualTransferRunsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
@@ -1085,7 +1085,7 @@ def start_manual_transfer_runs(
and end_time (exclusive), or for a specific run_time.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.StartManualTransferRunsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.StartManualTransferRunsRequest, dict]):
The request object. A request to start manual transfer
runs.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1128,7 +1128,7 @@ def start_manual_transfer_runs(

def get_transfer_run(
self,
request: datatransfer.GetTransferRunRequest = None,
request: Union[datatransfer.GetTransferRunRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -1139,7 +1139,7 @@ def get_transfer_run(
run.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.GetTransferRunRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.GetTransferRunRequest, dict]):
The request object. A request to get data transfer run
information.
name (str):
@@ -1201,7 +1201,7 @@ def get_transfer_run(

def delete_transfer_run(
self,
request: datatransfer.DeleteTransferRunRequest = None,
request: Union[datatransfer.DeleteTransferRunRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -1211,7 +1211,7 @@ def delete_transfer_run(
r"""Deletes the specified transfer run.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.DeleteTransferRunRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferRunRequest, dict]):
The request object. A request to delete data transfer
run information.
name (str):
@@ -1268,7 +1268,7 @@ def delete_transfer_run(

def list_transfer_runs(
self,
request: datatransfer.ListTransferRunsRequest = None,
request: Union[datatransfer.ListTransferRunsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -1278,7 +1278,7 @@ def list_transfer_runs(
r"""Returns information about running and completed jobs.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.ListTransferRunsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferRunsRequest, dict]):
The request object. A request to list data transfer
runs. UI can use this method to show/filter specific
data transfer runs. The data source can use this method
@@ -1353,7 +1353,7 @@ def list_transfer_runs(

def list_transfer_logs(
self,
request: datatransfer.ListTransferLogsRequest = None,
request: Union[datatransfer.ListTransferLogsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -1364,7 +1364,7 @@ def list_transfer_logs(
transfer run.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.ListTransferLogsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.ListTransferLogsRequest, dict]):
The request object. A request to get user facing log
messages associated with data transfer run.
parent (str):
@@ -1436,7 +1436,7 @@ def list_transfer_logs(

def check_valid_creds(
self,
request: datatransfer.CheckValidCredsRequest = None,
request: Union[datatransfer.CheckValidCredsRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -1452,7 +1452,7 @@ def check_valid_creds(
can create a transfer config.
Args:
request (google.cloud.bigquery_datatransfer_v1.types.CheckValidCredsRequest):
request (Union[google.cloud.bigquery_datatransfer_v1.types.CheckValidCredsRequest, dict]):
The request object. A request to determine whether the
user has valid credentials. This method is used to limit
the number of OAuth popups in the user interface. The
@@ -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)
@@ -85,16 +85,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.
@@ -132,16 +132,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,20 +39,20 @@ def partition(
class bigquery_datatransferCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'check_valid_creds': ('name', ),
'create_transfer_config': ('parent', 'transfer_config', 'authorization_code', 'version_info', 'service_account_name', ),
'delete_transfer_config': ('name', ),
'delete_transfer_run': ('name', ),
'get_data_source': ('name', ),
'get_transfer_config': ('name', ),
'get_transfer_run': ('name', ),
'list_data_sources': ('parent', 'page_token', 'page_size', ),
'list_transfer_configs': ('parent', 'data_source_ids', 'page_token', 'page_size', ),
'list_transfer_logs': ('parent', 'page_token', 'page_size', 'message_types', ),
'list_transfer_runs': ('parent', 'states', 'page_token', 'page_size', 'run_attempt', ),
'schedule_transfer_runs': ('parent', 'start_time', 'end_time', ),
'start_manual_transfer_runs': ('parent', 'requested_time_range', 'requested_run_time', ),
'update_transfer_config': ('transfer_config', 'update_mask', 'authorization_code', 'version_info', 'service_account_name', ),
'check_valid_creds': ('name', ),
'create_transfer_config': ('parent', 'transfer_config', 'authorization_code', 'version_info', 'service_account_name', ),
'delete_transfer_config': ('name', ),
'delete_transfer_run': ('name', ),
'get_data_source': ('name', ),
'get_transfer_config': ('name', ),
'get_transfer_run': ('name', ),
'list_data_sources': ('parent', 'page_token', 'page_size', ),
'list_transfer_configs': ('parent', 'data_source_ids', 'page_token', 'page_size', ),
'list_transfer_logs': ('parent', 'page_token', 'page_size', 'message_types', ),
'list_transfer_runs': ('parent', 'states', 'page_token', 'page_size', 'run_attempt', ),
'schedule_transfer_runs': ('parent', 'start_time', 'end_time', ),
'start_manual_transfer_runs': ('parent', 'requested_time_range', 'requested_run_time', ),
'update_transfer_config': ('transfer_config', 'update_mask', 'authorization_code', 'version_info', 'service_account_name', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -71,7 +71,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 fe024db

Please sign in to comment.