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

Commit aef02f1

Browse files
chore: use gapic-generator-python 0.51.2 (#21)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent ab88975 commit aef02f1

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

google/cloud/storage_transfer_v1/services/storage_transfer_service/client.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -346,7 +346,7 @@ def __init__(
346346

347347
def get_google_service_account(
348348
self,
349-
request: transfer.GetGoogleServiceAccountRequest = None,
349+
request: Union[transfer.GetGoogleServiceAccountRequest, dict] = None,
350350
*,
351351
retry: retries.Retry = gapic_v1.method.DEFAULT,
352352
timeout: float = None,
@@ -364,7 +364,7 @@ def get_google_service_account(
364364
Service.
365365
366366
Args:
367-
request (google.cloud.storage_transfer_v1.types.GetGoogleServiceAccountRequest):
367+
request (Union[google.cloud.storage_transfer_v1.types.GetGoogleServiceAccountRequest, dict]):
368368
The request object. Request passed to
369369
GetGoogleServiceAccount.
370370
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -399,7 +399,7 @@ def get_google_service_account(
399399

400400
def create_transfer_job(
401401
self,
402-
request: transfer.CreateTransferJobRequest = None,
402+
request: Union[transfer.CreateTransferJobRequest, dict] = None,
403403
*,
404404
retry: retries.Retry = gapic_v1.method.DEFAULT,
405405
timeout: float = None,
@@ -408,7 +408,7 @@ def create_transfer_job(
408408
r"""Creates a transfer job that runs periodically.
409409
410410
Args:
411-
request (google.cloud.storage_transfer_v1.types.CreateTransferJobRequest):
411+
request (Union[google.cloud.storage_transfer_v1.types.CreateTransferJobRequest, dict]):
412412
The request object. Request passed to CreateTransferJob.
413413
retry (google.api_core.retry.Retry): Designation of what errors, if any,
414414
should be retried.
@@ -443,7 +443,7 @@ def create_transfer_job(
443443

444444
def update_transfer_job(
445445
self,
446-
request: transfer.UpdateTransferJobRequest = None,
446+
request: Union[transfer.UpdateTransferJobRequest, dict] = None,
447447
*,
448448
retry: retries.Retry = gapic_v1.method.DEFAULT,
449449
timeout: float = None,
@@ -462,7 +462,7 @@ def update_transfer_job(
462462
[ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
463463
464464
Args:
465-
request (google.cloud.storage_transfer_v1.types.UpdateTransferJobRequest):
465+
request (Union[google.cloud.storage_transfer_v1.types.UpdateTransferJobRequest, dict]):
466466
The request object. Request passed to UpdateTransferJob.
467467
retry (google.api_core.retry.Retry): Designation of what errors, if any,
468468
should be retried.
@@ -503,7 +503,7 @@ def update_transfer_job(
503503

504504
def get_transfer_job(
505505
self,
506-
request: transfer.GetTransferJobRequest = None,
506+
request: Union[transfer.GetTransferJobRequest, dict] = None,
507507
*,
508508
retry: retries.Retry = gapic_v1.method.DEFAULT,
509509
timeout: float = None,
@@ -512,7 +512,7 @@ def get_transfer_job(
512512
r"""Gets a transfer job.
513513
514514
Args:
515-
request (google.cloud.storage_transfer_v1.types.GetTransferJobRequest):
515+
request (Union[google.cloud.storage_transfer_v1.types.GetTransferJobRequest, dict]):
516516
The request object. Request passed to GetTransferJob.
517517
retry (google.api_core.retry.Retry): Designation of what errors, if any,
518518
should be retried.
@@ -553,7 +553,7 @@ def get_transfer_job(
553553

554554
def list_transfer_jobs(
555555
self,
556-
request: transfer.ListTransferJobsRequest = None,
556+
request: Union[transfer.ListTransferJobsRequest, dict] = None,
557557
*,
558558
retry: retries.Retry = gapic_v1.method.DEFAULT,
559559
timeout: float = None,
@@ -562,7 +562,7 @@ def list_transfer_jobs(
562562
r"""Lists transfer jobs.
563563
564564
Args:
565-
request (google.cloud.storage_transfer_v1.types.ListTransferJobsRequest):
565+
request (Union[google.cloud.storage_transfer_v1.types.ListTransferJobsRequest, dict]):
566566
The request object. `projectId`, `jobNames`, and
567567
`jobStatuses` are query parameters that can be specified
568568
when listing transfer jobs.
@@ -606,7 +606,7 @@ def list_transfer_jobs(
606606

607607
def pause_transfer_operation(
608608
self,
609-
request: transfer.PauseTransferOperationRequest = None,
609+
request: Union[transfer.PauseTransferOperationRequest, dict] = None,
610610
*,
611611
retry: retries.Retry = gapic_v1.method.DEFAULT,
612612
timeout: float = None,
@@ -615,7 +615,7 @@ def pause_transfer_operation(
615615
r"""Pauses a transfer operation.
616616
617617
Args:
618-
request (google.cloud.storage_transfer_v1.types.PauseTransferOperationRequest):
618+
request (Union[google.cloud.storage_transfer_v1.types.PauseTransferOperationRequest, dict]):
619619
The request object. Request passed to
620620
PauseTransferOperation.
621621
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -649,7 +649,7 @@ def pause_transfer_operation(
649649

650650
def resume_transfer_operation(
651651
self,
652-
request: transfer.ResumeTransferOperationRequest = None,
652+
request: Union[transfer.ResumeTransferOperationRequest, dict] = None,
653653
*,
654654
retry: retries.Retry = gapic_v1.method.DEFAULT,
655655
timeout: float = None,
@@ -658,7 +658,7 @@ def resume_transfer_operation(
658658
r"""Resumes a transfer operation that is paused.
659659
660660
Args:
661-
request (google.cloud.storage_transfer_v1.types.ResumeTransferOperationRequest):
661+
request (Union[google.cloud.storage_transfer_v1.types.ResumeTransferOperationRequest, dict]):
662662
The request object. Request passed to
663663
ResumeTransferOperation.
664664
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -694,7 +694,7 @@ def resume_transfer_operation(
694694

695695
def run_transfer_job(
696696
self,
697-
request: transfer.RunTransferJobRequest = None,
697+
request: Union[transfer.RunTransferJobRequest, dict] = None,
698698
*,
699699
retry: retries.Retry = gapic_v1.method.DEFAULT,
700700
timeout: float = None,
@@ -706,7 +706,7 @@ def run_transfer_job(
706706
a TransferOperation is active, an error wil be returned.
707707
708708
Args:
709-
request (google.cloud.storage_transfer_v1.types.RunTransferJobRequest):
709+
request (Union[google.cloud.storage_transfer_v1.types.RunTransferJobRequest, dict]):
710710
The request object. Request passed to RunTransferJob.
711711
retry (google.api_core.retry.Retry): Designation of what errors, if any,
712712
should be retried.

google/cloud/storage_transfer_v1/services/storage_transfer_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(
121121
**scopes_kwargs, quota_project_id=quota_project_id
122122
)
123123

124-
# If the credentials is service account credentials, then always try to use self signed JWT.
124+
# If the credentials are service account credentials, then always try to use self signed JWT.
125125
if (
126126
always_use_jwt_access
127127
and isinstance(credentials, service_account.Credentials)

google/cloud/storage_transfer_v1/services/storage_transfer_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ def __init__(
8686
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8787
If provided, it overrides the ``host`` argument and tries to create
8888
a mutual TLS channel with client SSL credentials from
89-
``client_cert_source`` or applicatin default SSL credentials.
89+
``client_cert_source`` or application default SSL credentials.
9090
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
9191
Deprecated. A callback to provide client SSL certificate bytes and
9292
private key bytes, both in PEM format. It is ignored if
9393
``api_mtls_endpoint`` is None.
9494
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
95-
for grpc channel. It is ignored if ``channel`` is provided.
95+
for the grpc channel. It is ignored if ``channel`` is provided.
9696
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9797
A callback to provide client certificate bytes and private key bytes,
98-
both in PEM format. It is used to configure mutual TLS channel. It is
98+
both in PEM format. It is used to configure a mutual TLS channel. It is
9999
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
100100
quota_project_id (Optional[str]): An optional project to use for billing
101101
and quota.

google/cloud/storage_transfer_v1/services/storage_transfer_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ def __init__(
133133
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
134134
If provided, it overrides the ``host`` argument and tries to create
135135
a mutual TLS channel with client SSL credentials from
136-
``client_cert_source`` or applicatin default SSL credentials.
136+
``client_cert_source`` or application default SSL credentials.
137137
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
138138
Deprecated. A callback to provide client SSL certificate bytes and
139139
private key bytes, both in PEM format. It is ignored if
140140
``api_mtls_endpoint`` is None.
141141
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
142-
for grpc channel. It is ignored if ``channel`` is provided.
142+
for the grpc channel. It is ignored if ``channel`` is provided.
143143
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
144144
A callback to provide client certificate bytes and private key bytes,
145-
both in PEM format. It is used to configure mutual TLS channel. It is
145+
both in PEM format. It is used to configure a mutual TLS channel. It is
146146
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
147147
quota_project_id (Optional[str]): An optional project to use for billing
148148
and quota.

scripts/fixup_storage_transfer_v1_keywords.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def partition(
3939
class storage_transferCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_transfer_job': ('transfer_job', ),
43-
'get_google_service_account': ('project_id', ),
44-
'get_transfer_job': ('job_name', 'project_id', ),
45-
'list_transfer_jobs': ('filter', 'page_size', 'page_token', ),
46-
'pause_transfer_operation': ('name', ),
47-
'resume_transfer_operation': ('name', ),
48-
'run_transfer_job': ('job_name', 'project_id', ),
49-
'update_transfer_job': ('job_name', 'project_id', 'transfer_job', 'update_transfer_job_field_mask', ),
42+
'create_transfer_job': ('transfer_job', ),
43+
'get_google_service_account': ('project_id', ),
44+
'get_transfer_job': ('job_name', 'project_id', ),
45+
'list_transfer_jobs': ('filter', 'page_size', 'page_token', ),
46+
'pause_transfer_operation': ('name', ),
47+
'resume_transfer_operation': ('name', ),
48+
'run_transfer_job': ('job_name', 'project_id', ),
49+
'update_transfer_job': ('job_name', 'project_id', 'transfer_job', 'update_transfer_job_field_mask', ),
5050
}
5151

5252
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -65,7 +65,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6565
return updated
6666

6767
kwargs, ctrl_kwargs = partition(
68-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
68+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6969
kwargs
7070
)
7171

0 commit comments

Comments
 (0)