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

Commit c07f6c9

Browse files
chore: use gapic-generator-python 0.51.2 (#37)
- [ ] 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 224150f commit c07f6c9

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

google/cloud/shell_v1/services/cloud_shell_service/client.py

+11-11
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
@@ -360,7 +360,7 @@ def __init__(
360360

361361
def get_environment(
362362
self,
363-
request: cloudshell.GetEnvironmentRequest = None,
363+
request: Union[cloudshell.GetEnvironmentRequest, dict] = None,
364364
*,
365365
name: str = None,
366366
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -371,7 +371,7 @@ def get_environment(
371371
not exist.
372372
373373
Args:
374-
request (google.cloud.shell_v1.types.GetEnvironmentRequest):
374+
request (Union[google.cloud.shell_v1.types.GetEnvironmentRequest, dict]):
375375
The request object. Request message for
376376
[GetEnvironment][google.cloud.shell.v1.CloudShellService.GetEnvironment].
377377
name (str):
@@ -439,7 +439,7 @@ def get_environment(
439439

440440
def start_environment(
441441
self,
442-
request: cloudshell.StartEnvironmentRequest = None,
442+
request: Union[cloudshell.StartEnvironmentRequest, dict] = None,
443443
*,
444444
retry: retries.Retry = gapic_v1.method.DEFAULT,
445445
timeout: float = None,
@@ -455,7 +455,7 @@ def start_environment(
455455
StartEnvironmentResponse in its response field.
456456
457457
Args:
458-
request (google.cloud.shell_v1.types.StartEnvironmentRequest):
458+
request (Union[google.cloud.shell_v1.types.StartEnvironmentRequest, dict]):
459459
The request object. Request message for
460460
[StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment].
461461
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -507,7 +507,7 @@ def start_environment(
507507

508508
def authorize_environment(
509509
self,
510-
request: cloudshell.AuthorizeEnvironmentRequest = None,
510+
request: Union[cloudshell.AuthorizeEnvironmentRequest, dict] = None,
511511
*,
512512
retry: retries.Retry = gapic_v1.method.DEFAULT,
513513
timeout: float = None,
@@ -520,7 +520,7 @@ def authorize_environment(
520520
authenticate.
521521
522522
Args:
523-
request (google.cloud.shell_v1.types.AuthorizeEnvironmentRequest):
523+
request (Union[google.cloud.shell_v1.types.AuthorizeEnvironmentRequest, dict]):
524524
The request object. Request message for
525525
[AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment].
526526
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -571,7 +571,7 @@ def authorize_environment(
571571

572572
def add_public_key(
573573
self,
574-
request: cloudshell.AddPublicKeyRequest = None,
574+
request: Union[cloudshell.AddPublicKeyRequest, dict] = None,
575575
*,
576576
retry: retries.Retry = gapic_v1.method.DEFAULT,
577577
timeout: float = None,
@@ -583,7 +583,7 @@ def add_public_key(
583583
error with ALREADY_EXISTS.
584584
585585
Args:
586-
request (google.cloud.shell_v1.types.AddPublicKeyRequest):
586+
request (Union[google.cloud.shell_v1.types.AddPublicKeyRequest, dict]):
587587
The request object. Request message for
588588
[AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey].
589589
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -636,7 +636,7 @@ def add_public_key(
636636

637637
def remove_public_key(
638638
self,
639-
request: cloudshell.RemovePublicKeyRequest = None,
639+
request: Union[cloudshell.RemovePublicKeyRequest, dict] = None,
640640
*,
641641
retry: retries.Retry = gapic_v1.method.DEFAULT,
642642
timeout: float = None,
@@ -648,7 +648,7 @@ def remove_public_key(
648648
present, this will error with NOT_FOUND.
649649
650650
Args:
651-
request (google.cloud.shell_v1.types.RemovePublicKeyRequest):
651+
request (Union[google.cloud.shell_v1.types.RemovePublicKeyRequest, dict]):
652652
The request object. Request message for
653653
[RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey].
654654
retry (google.api_core.retry.Retry): Designation of what errors, if any,

google/cloud/shell_v1/services/cloud_shell_service/transports/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(
117117
**scopes_kwargs, quota_project_id=quota_project_id
118118
)
119119

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

google/cloud/shell_v1/services/cloud_shell_service/transports/grpc.py

+3-3
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/shell_v1/services/cloud_shell_service/transports/grpc_asyncio.py

+3-3
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_shell_v1_keywords.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def partition(
3939
class shellCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'add_public_key': ('environment', 'key', ),
43-
'authorize_environment': ('name', 'access_token', 'id_token', 'expire_time', ),
44-
'get_environment': ('name', ),
45-
'remove_public_key': ('environment', 'key', ),
46-
'start_environment': ('name', 'access_token', 'public_keys', ),
42+
'add_public_key': ('environment', 'key', ),
43+
'authorize_environment': ('name', 'access_token', 'id_token', 'expire_time', ),
44+
'get_environment': ('name', ),
45+
'remove_public_key': ('environment', 'key', ),
46+
'start_environment': ('name', 'access_token', 'public_keys', ),
4747
}
4848

4949
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -62,7 +62,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6262
return updated
6363

6464
kwargs, ctrl_kwargs = partition(
65-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
65+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6666
kwargs
6767
)
6868

0 commit comments

Comments
 (0)