Skip to content
Permalink
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
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent f5f8e91 commit d940eeadf232c1c4e74e4f86a65367a2bf37f428
@@ -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
@@ -380,7 +380,7 @@ def __init__(

def get_trigger(
self,
request: eventarc.GetTriggerRequest = None,
request: Union[eventarc.GetTriggerRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -390,7 +390,7 @@ def get_trigger(
r"""Get a single trigger.
Args:
request (google.cloud.eventarc_v1.types.GetTriggerRequest):
request (Union[google.cloud.eventarc_v1.types.GetTriggerRequest, dict]):
The request object. The request message for the
GetTrigger method.
name (str):
@@ -451,7 +451,7 @@ def get_trigger(

def list_triggers(
self,
request: eventarc.ListTriggersRequest = None,
request: Union[eventarc.ListTriggersRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -461,7 +461,7 @@ def list_triggers(
r"""List triggers.
Args:
request (google.cloud.eventarc_v1.types.ListTriggersRequest):
request (Union[google.cloud.eventarc_v1.types.ListTriggersRequest, dict]):
The request object. The request message for the
ListTriggers method.
parent (str):
@@ -531,7 +531,7 @@ def list_triggers(

def create_trigger(
self,
request: eventarc.CreateTriggerRequest = None,
request: Union[eventarc.CreateTriggerRequest, dict] = None,
*,
parent: str = None,
trigger: gce_trigger.Trigger = None,
@@ -544,7 +544,7 @@ def create_trigger(
location.
Args:
request (google.cloud.eventarc_v1.types.CreateTriggerRequest):
request (Union[google.cloud.eventarc_v1.types.CreateTriggerRequest, dict]):
The request object. The request message for the
CreateTrigger method.
parent (str):
@@ -632,7 +632,7 @@ def create_trigger(

def update_trigger(
self,
request: eventarc.UpdateTriggerRequest = None,
request: Union[eventarc.UpdateTriggerRequest, dict] = None,
*,
trigger: gce_trigger.Trigger = None,
update_mask: field_mask_pb2.FieldMask = None,
@@ -644,7 +644,7 @@ def update_trigger(
r"""Update a single trigger.
Args:
request (google.cloud.eventarc_v1.types.UpdateTriggerRequest):
request (Union[google.cloud.eventarc_v1.types.UpdateTriggerRequest, dict]):
The request object. The request message for the
UpdateTrigger method.
trigger (google.cloud.eventarc_v1.types.Trigger):
@@ -737,7 +737,7 @@ def update_trigger(

def delete_trigger(
self,
request: eventarc.DeleteTriggerRequest = None,
request: Union[eventarc.DeleteTriggerRequest, dict] = None,
*,
name: str = None,
allow_missing: bool = None,
@@ -748,7 +748,7 @@ def delete_trigger(
r"""Delete a single trigger.
Args:
request (google.cloud.eventarc_v1.types.DeleteTriggerRequest):
request (Union[google.cloud.eventarc_v1.types.DeleteTriggerRequest, dict]):
The request object. The request message for the
DeleteTrigger method.
name (str):
@@ -118,7 +118,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)
@@ -85,16 +85,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.
@@ -132,16 +132,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.
@@ -39,11 +39,11 @@ def partition(
class eventarcCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_trigger': ('parent', 'trigger', 'trigger_id', 'validate_only', ),
'delete_trigger': ('name', 'validate_only', 'etag', 'allow_missing', ),
'get_trigger': ('name', ),
'list_triggers': ('parent', 'page_size', 'page_token', 'order_by', ),
'update_trigger': ('validate_only', 'trigger', 'update_mask', 'allow_missing', ),
'create_trigger': ('parent', 'trigger', 'trigger_id', 'validate_only', ),
'delete_trigger': ('name', 'validate_only', 'etag', 'allow_missing', ),
'get_trigger': ('name', ),
'list_triggers': ('parent', 'page_size', 'page_token', 'order_by', ),
'update_trigger': ('validate_only', 'trigger', 'update_mask', 'allow_missing', ),
}

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:
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
)

0 comments on commit d940eea

Please sign in to comment.