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

Commit 96b0b6a

Browse files
chore: use gapic-generator-python 0.51.2 (#120)
- [ ] 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 13c19d6 commit 96b0b6a

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

google/cloud/iam_credentials_v1/services/iam_credentials/client.py

Lines changed: 9 additions & 9 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
@@ -363,7 +363,7 @@ def __init__(
363363

364364
def generate_access_token(
365365
self,
366-
request: common.GenerateAccessTokenRequest = None,
366+
request: Union[common.GenerateAccessTokenRequest, dict] = None,
367367
*,
368368
name: str = None,
369369
delegates: Sequence[str] = None,
@@ -377,7 +377,7 @@ def generate_access_token(
377377
account.
378378
379379
Args:
380-
request (google.cloud.iam_credentials_v1.types.GenerateAccessTokenRequest):
380+
request (Union[google.cloud.iam_credentials_v1.types.GenerateAccessTokenRequest, dict]):
381381
The request object.
382382
name (str):
383383
Required. The resource name of the service account for
@@ -485,7 +485,7 @@ def generate_access_token(
485485

486486
def generate_id_token(
487487
self,
488-
request: common.GenerateIdTokenRequest = None,
488+
request: Union[common.GenerateIdTokenRequest, dict] = None,
489489
*,
490490
name: str = None,
491491
delegates: Sequence[str] = None,
@@ -499,7 +499,7 @@ def generate_id_token(
499499
account.
500500
501501
Args:
502-
request (google.cloud.iam_credentials_v1.types.GenerateIdTokenRequest):
502+
request (Union[google.cloud.iam_credentials_v1.types.GenerateIdTokenRequest, dict]):
503503
The request object.
504504
name (str):
505505
Required. The resource name of the service account for
@@ -601,7 +601,7 @@ def generate_id_token(
601601

602602
def sign_blob(
603603
self,
604-
request: common.SignBlobRequest = None,
604+
request: Union[common.SignBlobRequest, dict] = None,
605605
*,
606606
name: str = None,
607607
delegates: Sequence[str] = None,
@@ -614,7 +614,7 @@ def sign_blob(
614614
private key.
615615
616616
Args:
617-
request (google.cloud.iam_credentials_v1.types.SignBlobRequest):
617+
request (Union[google.cloud.iam_credentials_v1.types.SignBlobRequest, dict]):
618618
The request object.
619619
name (str):
620620
Required. The resource name of the service account for
@@ -703,7 +703,7 @@ def sign_blob(
703703

704704
def sign_jwt(
705705
self,
706-
request: common.SignJwtRequest = None,
706+
request: Union[common.SignJwtRequest, dict] = None,
707707
*,
708708
name: str = None,
709709
delegates: Sequence[str] = None,
@@ -716,7 +716,7 @@ def sign_jwt(
716716
private key.
717717
718718
Args:
719-
request (google.cloud.iam_credentials_v1.types.SignJwtRequest):
719+
request (Union[google.cloud.iam_credentials_v1.types.SignJwtRequest, dict]):
720720
The request object.
721721
name (str):
722722
Required. The resource name of the service account for

google/cloud/iam_credentials_v1/services/iam_credentials/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(
115115
**scopes_kwargs, quota_project_id=quota_project_id
116116
)
117117

118-
# If the credentials is service account credentials, then always try to use self signed JWT.
118+
# If the credentials are service account credentials, then always try to use self signed JWT.
119119
if (
120120
always_use_jwt_access
121121
and isinstance(credentials, service_account.Credentials)

google/cloud/iam_credentials_v1/services/iam_credentials/transports/grpc.py

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

google/cloud/iam_credentials_v1/services/iam_credentials/transports/grpc_asyncio.py

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

scripts/fixup_credentials_v1_keywords.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ def partition(
3939
class credentialsCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'generate_access_token': ('name', 'scope', 'delegates', 'lifetime', ),
43-
'generate_id_token': ('name', 'audience', 'delegates', 'include_email', ),
44-
'sign_blob': ('name', 'payload', 'delegates', ),
45-
'sign_jwt': ('name', 'payload', 'delegates', ),
42+
'generate_access_token': ('name', 'scope', 'delegates', 'lifetime', ),
43+
'generate_id_token': ('name', 'audience', 'delegates', 'include_email', ),
44+
'sign_blob': ('name', 'payload', 'delegates', ),
45+
'sign_jwt': ('name', 'payload', 'delegates', ),
4646
}
4747

4848
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -61,7 +61,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6161
return updated
6262

6363
kwargs, ctrl_kwargs = partition(
64-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
64+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6565
kwargs
6666
)
6767

0 commit comments

Comments
 (0)