Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#184)
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: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 24, 2021
1 parent 602613d commit 42c8c64
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 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 @@ -367,7 +367,7 @@ def get_grafeas_client(self) -> grafeas_v1.GrafeasClient:

def set_iam_policy(
self,
request: iam_policy_pb2.SetIamPolicyRequest = None,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
resource: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -385,7 +385,7 @@ def set_iam_policy(
occurrences.
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.
resource (str):
Expand Down Expand Up @@ -500,7 +500,7 @@ def set_iam_policy(

def get_iam_policy(
self,
request: iam_policy_pb2.GetIamPolicyRequest = None,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
resource: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -518,7 +518,7 @@ def get_iam_policy(
occurrences.
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.
resource (str):
Expand Down Expand Up @@ -633,7 +633,7 @@ def get_iam_policy(

def test_iam_permissions(
self,
request: iam_policy_pb2.TestIamPermissionsRequest = None,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
resource: str = None,
permissions: Sequence[str] = None,
Expand All @@ -651,7 +651,7 @@ def test_iam_permissions(
occurrences.
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.
resource (str):
Expand Down Expand Up @@ -722,7 +722,9 @@ def test_iam_permissions(

def get_vulnerability_occurrences_summary(
self,
request: containeranalysis.GetVulnerabilityOccurrencesSummaryRequest = None,
request: Union[
containeranalysis.GetVulnerabilityOccurrencesSummaryRequest, dict
] = None,
*,
parent: str = None,
filter: str = None,
Expand All @@ -734,7 +736,7 @@ def get_vulnerability_occurrences_summary(
occurrences.
Args:
request (google.cloud.devtools.containeranalysis_v1.types.GetVulnerabilityOccurrencesSummaryRequest):
request (Union[google.cloud.devtools.containeranalysis_v1.types.GetVulnerabilityOccurrencesSummaryRequest, dict]):
The request object. Request to get a vulnerability
summary for some set of occurrences.
parent (str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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,16 +96,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
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,16 +143,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
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
10 changes: 5 additions & 5 deletions scripts/fixup_containeranalysis_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def partition(
class containeranalysisCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'get_iam_policy': ('resource', 'options', ),
'get_vulnerability_occurrences_summary': ('parent', 'filter', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
'get_iam_policy': ('resource', 'options', ),
'get_vulnerability_occurrences_summary': ('parent', 'filter', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
}

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

Please sign in to comment.