Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#199)
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] authored Sep 24, 2021
1 parent 07e5a28 commit ccf2a9d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
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 @@ -401,7 +401,7 @@ def list_secrets(
r"""Lists [Secrets][google.cloud.secretmanager.v1.Secret].
Args:
request (google.cloud.secretmanager_v1.types.ListSecretsRequest):
request (Union[google.cloud.secretmanager_v1.types.ListSecretsRequest, dict]):
The request object. Request message for
[SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets].
parent (str):
Expand Down Expand Up @@ -487,7 +487,7 @@ def create_secret(
[SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
Args:
request (google.cloud.secretmanager_v1.types.CreateSecretRequest):
request (Union[google.cloud.secretmanager_v1.types.CreateSecretRequest, dict]):
The request object. Request message for
[SecretManagerService.CreateSecret][google.cloud.secretmanager.v1.SecretManagerService.CreateSecret].
parent (str):
Expand Down Expand Up @@ -591,7 +591,7 @@ def add_secret_version(
[Secret][google.cloud.secretmanager.v1.Secret].
Args:
request (google.cloud.secretmanager_v1.types.AddSecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.AddSecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion].
parent (str):
Expand Down Expand Up @@ -675,7 +675,7 @@ def get_secret(
[Secret][google.cloud.secretmanager.v1.Secret].
Args:
request (google.cloud.secretmanager_v1.types.GetSecretRequest):
request (Union[google.cloud.secretmanager_v1.types.GetSecretRequest, dict]):
The request object. Request message for
[SecretManagerService.GetSecret][google.cloud.secretmanager.v1.SecretManagerService.GetSecret].
name (str):
Expand Down Expand Up @@ -742,7 +742,7 @@ def get_secret(

def update_secret(
self,
request: service.UpdateSecretRequest = None,
request: Union[service.UpdateSecretRequest, dict] = None,
*,
secret: resources.Secret = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -754,7 +754,7 @@ def update_secret(
[Secret][google.cloud.secretmanager.v1.Secret].
Args:
request (google.cloud.secretmanager_v1.types.UpdateSecretRequest):
request (Union[google.cloud.secretmanager_v1.types.UpdateSecretRequest, dict]):
The request object. Request message for
[SecretManagerService.UpdateSecret][google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret].
secret (google.cloud.secretmanager_v1.types.Secret):
Expand Down Expand Up @@ -841,7 +841,7 @@ def delete_secret(
r"""Deletes a [Secret][google.cloud.secretmanager.v1.Secret].
Args:
request (google.cloud.secretmanager_v1.types.DeleteSecretRequest):
request (Union[google.cloud.secretmanager_v1.types.DeleteSecretRequest, dict]):
The request object. Request message for
[SecretManagerService.DeleteSecret][google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret].
name (str):
Expand Down Expand Up @@ -908,7 +908,7 @@ def list_secret_versions(
This call does not return secret data.
Args:
request (google.cloud.secretmanager_v1.types.ListSecretVersionsRequest):
request (Union[google.cloud.secretmanager_v1.types.ListSecretVersionsRequest, dict]):
The request object. Request message for
[SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions].
parent (str):
Expand Down Expand Up @@ -996,7 +996,7 @@ def get_secret_version(
[SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
Args:
request (google.cloud.secretmanager_v1.types.GetSecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.GetSecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.GetSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion].
name (str):
Expand Down Expand Up @@ -1078,7 +1078,7 @@ def access_secret_version(
[SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
Args:
request (google.cloud.secretmanager_v1.types.AccessSecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.AccessSecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion].
name (str):
Expand Down Expand Up @@ -1161,7 +1161,7 @@ def disable_secret_version(
[DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].
Args:
request (google.cloud.secretmanager_v1.types.DisableSecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.DisableSecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.DisableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion].
name (str):
Expand Down Expand Up @@ -1241,7 +1241,7 @@ def enable_secret_version(
[ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].
Args:
request (google.cloud.secretmanager_v1.types.EnableSecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.EnableSecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion].
name (str):
Expand Down Expand Up @@ -1322,7 +1322,7 @@ def destroy_secret_version(
and irrevocably destroys the secret data.
Args:
request (google.cloud.secretmanager_v1.types.DestroySecretVersionRequest):
request (Union[google.cloud.secretmanager_v1.types.DestroySecretVersionRequest, dict]):
The request object. Request message for
[SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion].
name (str):
Expand Down Expand Up @@ -1400,7 +1400,7 @@ def set_iam_policy(
[Secret][google.cloud.secretmanager.v1.Secret].
Args:
request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest):
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
The request object. Request message for `SetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1506,7 +1506,7 @@ def get_iam_policy(
have a policy set.
Args:
request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest):
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
The request object. Request message for `GetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1617,7 +1617,7 @@ def test_iam_permissions(
warning.
Args:
request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest):
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
The request object. Request message for
`TestIamPermissions` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def __init__(
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
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def __init__(
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ def partition(
class secretmanagerCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'access_secret_version': ('name', ),
'add_secret_version': ('parent', 'payload', ),
'create_secret': ('parent', 'secret_id', 'secret', ),
'delete_secret': ('name', 'etag', ),
'destroy_secret_version': ('name', 'etag', ),
'disable_secret_version': ('name', 'etag', ),
'enable_secret_version': ('name', 'etag', ),
'get_iam_policy': ('resource', 'options', ),
'get_secret': ('name', ),
'get_secret_version': ('name', ),
'list_secrets': ('parent', 'page_size', 'page_token', 'filter', ),
'list_secret_versions': ('parent', 'page_size', 'page_token', 'filter', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
'update_secret': ('secret', 'update_mask', ),
'access_secret_version': ('name', ),
'add_secret_version': ('parent', 'payload', ),
'create_secret': ('parent', 'secret_id', 'secret', ),
'delete_secret': ('name', 'etag', ),
'destroy_secret_version': ('name', 'etag', ),
'disable_secret_version': ('name', 'etag', ),
'enable_secret_version': ('name', 'etag', ),
'get_iam_policy': ('resource', 'options', ),
'get_secret': ('name', ),
'get_secret_version': ('name', ),
'list_secrets': ('parent', 'page_size', 'page_token', 'filter', ),
'list_secret_versions': ('parent', 'page_size', 'page_token', 'filter', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
'update_secret': ('secret', 'update_mask', ),
}

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

Please sign in to comment.