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

Commit 88a867a

Browse files
chore: use gapic-generator-python 0.51.2 (#42)
- [ ] 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 6468abf commit 88a867a

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

google/cloud/resourcesettings_v1/services/resource_settings_service/client.py

+7-7
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
@@ -366,7 +366,7 @@ def __init__(
366366

367367
def list_settings(
368368
self,
369-
request: resource_settings.ListSettingsRequest = None,
369+
request: Union[resource_settings.ListSettingsRequest, dict] = None,
370370
*,
371371
parent: str = None,
372372
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -377,7 +377,7 @@ def list_settings(
377377
``parent``.
378378
379379
Args:
380-
request (google.cloud.resourcesettings_v1.types.ListSettingsRequest):
380+
request (Union[google.cloud.resourcesettings_v1.types.ListSettingsRequest, dict]):
381381
The request object. The request for ListSettings.
382382
parent (str):
383383
Required. The Cloud resource that parents the setting.
@@ -450,7 +450,7 @@ def list_settings(
450450

451451
def get_setting(
452452
self,
453-
request: resource_settings.GetSettingRequest = None,
453+
request: Union[resource_settings.GetSettingRequest, dict] = None,
454454
*,
455455
name: str = None,
456456
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -463,7 +463,7 @@ def get_setting(
463463
``google.rpc.Code.NOT_FOUND`` if the setting does not exist.
464464
465465
Args:
466-
request (google.cloud.resourcesettings_v1.types.GetSettingRequest):
466+
request (Union[google.cloud.resourcesettings_v1.types.GetSettingRequest, dict]):
467467
The request object. The request for GetSetting.
468468
name (str):
469469
Required. The name of the setting to get. See
@@ -522,7 +522,7 @@ def get_setting(
522522

523523
def update_setting(
524524
self,
525-
request: resource_settings.UpdateSettingRequest = None,
525+
request: Union[resource_settings.UpdateSettingRequest, dict] = None,
526526
*,
527527
retry: retries.Retry = gapic_v1.method.DEFAULT,
528528
timeout: float = None,
@@ -546,7 +546,7 @@ def update_setting(
546546
``local_value`` field.
547547
548548
Args:
549-
request (google.cloud.resourcesettings_v1.types.UpdateSettingRequest):
549+
request (Union[google.cloud.resourcesettings_v1.types.UpdateSettingRequest, dict]):
550550
The request object. The request for UpdateSetting.
551551
retry (google.api_core.retry.Retry): Designation of what errors, if any,
552552
should be retried.

google/cloud/resourcesettings_v1/services/resource_settings_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/resourcesettings_v1/services/resource_settings_service/transports/grpc.py

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

google/cloud/resourcesettings_v1/services/resource_settings_service/transports/grpc_asyncio.py

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

scripts/fixup_resourcesettings_v1_keywords.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def partition(
3939
class resourcesettingsCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'get_setting': ('name', 'view', ),
43-
'list_settings': ('parent', 'page_size', 'page_token', 'view', ),
44-
'update_setting': ('setting', ),
42+
'get_setting': ('name', 'view', ),
43+
'list_settings': ('parent', 'page_size', 'page_token', 'view', ),
44+
'update_setting': ('setting', ),
4545
}
4646

4747
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -60,7 +60,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6060
return updated
6161

6262
kwargs, ctrl_kwargs = partition(
63-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
63+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6464
kwargs
6565
)
6666

0 commit comments

Comments
 (0)