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

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#21)
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 ab88975 commit aef02f1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
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 @@ -346,7 +346,7 @@ def __init__(

def get_google_service_account(
self,
request: transfer.GetGoogleServiceAccountRequest = None,
request: Union[transfer.GetGoogleServiceAccountRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -364,7 +364,7 @@ def get_google_service_account(
Service.
Args:
request (google.cloud.storage_transfer_v1.types.GetGoogleServiceAccountRequest):
request (Union[google.cloud.storage_transfer_v1.types.GetGoogleServiceAccountRequest, dict]):
The request object. Request passed to
GetGoogleServiceAccount.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -399,7 +399,7 @@ def get_google_service_account(

def create_transfer_job(
self,
request: transfer.CreateTransferJobRequest = None,
request: Union[transfer.CreateTransferJobRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -408,7 +408,7 @@ def create_transfer_job(
r"""Creates a transfer job that runs periodically.
Args:
request (google.cloud.storage_transfer_v1.types.CreateTransferJobRequest):
request (Union[google.cloud.storage_transfer_v1.types.CreateTransferJobRequest, dict]):
The request object. Request passed to CreateTransferJob.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -443,7 +443,7 @@ def create_transfer_job(

def update_transfer_job(
self,
request: transfer.UpdateTransferJobRequest = None,
request: Union[transfer.UpdateTransferJobRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -462,7 +462,7 @@ def update_transfer_job(
[ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
Args:
request (google.cloud.storage_transfer_v1.types.UpdateTransferJobRequest):
request (Union[google.cloud.storage_transfer_v1.types.UpdateTransferJobRequest, dict]):
The request object. Request passed to UpdateTransferJob.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -503,7 +503,7 @@ def update_transfer_job(

def get_transfer_job(
self,
request: transfer.GetTransferJobRequest = None,
request: Union[transfer.GetTransferJobRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -512,7 +512,7 @@ def get_transfer_job(
r"""Gets a transfer job.
Args:
request (google.cloud.storage_transfer_v1.types.GetTransferJobRequest):
request (Union[google.cloud.storage_transfer_v1.types.GetTransferJobRequest, dict]):
The request object. Request passed to GetTransferJob.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -553,7 +553,7 @@ def get_transfer_job(

def list_transfer_jobs(
self,
request: transfer.ListTransferJobsRequest = None,
request: Union[transfer.ListTransferJobsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -562,7 +562,7 @@ def list_transfer_jobs(
r"""Lists transfer jobs.
Args:
request (google.cloud.storage_transfer_v1.types.ListTransferJobsRequest):
request (Union[google.cloud.storage_transfer_v1.types.ListTransferJobsRequest, dict]):
The request object. `projectId`, `jobNames`, and
`jobStatuses` are query parameters that can be specified
when listing transfer jobs.
Expand Down Expand Up @@ -606,7 +606,7 @@ def list_transfer_jobs(

def pause_transfer_operation(
self,
request: transfer.PauseTransferOperationRequest = None,
request: Union[transfer.PauseTransferOperationRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -615,7 +615,7 @@ def pause_transfer_operation(
r"""Pauses a transfer operation.
Args:
request (google.cloud.storage_transfer_v1.types.PauseTransferOperationRequest):
request (Union[google.cloud.storage_transfer_v1.types.PauseTransferOperationRequest, dict]):
The request object. Request passed to
PauseTransferOperation.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -649,7 +649,7 @@ def pause_transfer_operation(

def resume_transfer_operation(
self,
request: transfer.ResumeTransferOperationRequest = None,
request: Union[transfer.ResumeTransferOperationRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -658,7 +658,7 @@ def resume_transfer_operation(
r"""Resumes a transfer operation that is paused.
Args:
request (google.cloud.storage_transfer_v1.types.ResumeTransferOperationRequest):
request (Union[google.cloud.storage_transfer_v1.types.ResumeTransferOperationRequest, dict]):
The request object. Request passed to
ResumeTransferOperation.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -694,7 +694,7 @@ def resume_transfer_operation(

def run_transfer_job(
self,
request: transfer.RunTransferJobRequest = None,
request: Union[transfer.RunTransferJobRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -706,7 +706,7 @@ def run_transfer_job(
a TransferOperation is active, an error wil be returned.
Args:
request (google.cloud.storage_transfer_v1.types.RunTransferJobRequest):
request (Union[google.cloud.storage_transfer_v1.types.RunTransferJobRequest, dict]):
The request object. Request passed to RunTransferJob.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down
Expand Up @@ -121,7 +121,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 @@ -86,16 +86,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 @@ -133,16 +133,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
18 changes: 9 additions & 9 deletions scripts/fixup_storage_transfer_v1_keywords.py
Expand Up @@ -39,14 +39,14 @@ def partition(
class storage_transferCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_transfer_job': ('transfer_job', ),
'get_google_service_account': ('project_id', ),
'get_transfer_job': ('job_name', 'project_id', ),
'list_transfer_jobs': ('filter', 'page_size', 'page_token', ),
'pause_transfer_operation': ('name', ),
'resume_transfer_operation': ('name', ),
'run_transfer_job': ('job_name', 'project_id', ),
'update_transfer_job': ('job_name', 'project_id', 'transfer_job', 'update_transfer_job_field_mask', ),
'create_transfer_job': ('transfer_job', ),
'get_google_service_account': ('project_id', ),
'get_transfer_job': ('job_name', 'project_id', ),
'list_transfer_jobs': ('filter', 'page_size', 'page_token', ),
'pause_transfer_operation': ('name', ),
'resume_transfer_operation': ('name', ),
'run_transfer_job': ('job_name', 'project_id', ),
'update_transfer_job': ('job_name', 'project_id', 'transfer_job', 'update_transfer_job_field_mask', ),
}

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

Please sign in to comment.