Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.51.2 (#177)
- [ ] 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 committed Sep 24, 2021
1 parent 4a76f8f commit 253a66f5f606f722bf5401cdd678989b9d2baa98
@@ -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
@@ -349,7 +349,7 @@ def __init__(

def get_group(
self,
request: error_group_service.GetGroupRequest = None,
request: Union[error_group_service.GetGroupRequest, dict] = None,
*,
group_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -359,7 +359,7 @@ def get_group(
r"""Get the specified group.
Args:
request (google.cloud.errorreporting_v1beta1.types.GetGroupRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.GetGroupRequest, dict]):
The request object. A request to return an individual
group.
group_name (str):
@@ -426,7 +426,7 @@ def get_group(

def update_group(
self,
request: error_group_service.UpdateGroupRequest = None,
request: Union[error_group_service.UpdateGroupRequest, dict] = None,
*,
group: common.ErrorGroup = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -437,7 +437,7 @@ def update_group(
Fails if the group does not exist.
Args:
request (google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest, dict]):
The request object. A request to replace the existing
data for the given group.
group (google.cloud.errorreporting_v1beta1.types.ErrorGroup):
@@ -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)
@@ -81,16 +81,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.
@@ -128,16 +128,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.
@@ -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
@@ -352,7 +352,7 @@ def __init__(

def list_group_stats(
self,
request: error_stats_service.ListGroupStatsRequest = None,
request: Union[error_stats_service.ListGroupStatsRequest, dict] = None,
*,
project_name: str = None,
time_range: error_stats_service.QueryTimeRange = None,
@@ -363,7 +363,7 @@ def list_group_stats(
r"""Lists the specified groups.
Args:
request (google.cloud.errorreporting_v1beta1.types.ListGroupStatsRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.ListGroupStatsRequest, dict]):
The request object. Specifies a set of `ErrorGroupStats`
to return.
project_name (str):
@@ -456,7 +456,7 @@ def list_group_stats(

def list_events(
self,
request: error_stats_service.ListEventsRequest = None,
request: Union[error_stats_service.ListEventsRequest, dict] = None,
*,
project_name: str = None,
group_id: str = None,
@@ -467,7 +467,7 @@ def list_events(
r"""Lists the specified events.
Args:
request (google.cloud.errorreporting_v1beta1.types.ListEventsRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.ListEventsRequest, dict]):
The request object. Specifies a set of error events to
return.
project_name (str):
@@ -552,7 +552,7 @@ def list_events(

def delete_events(
self,
request: error_stats_service.DeleteEventsRequest = None,
request: Union[error_stats_service.DeleteEventsRequest, dict] = None,
*,
project_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -562,7 +562,7 @@ def delete_events(
r"""Deletes all error events of a given project.
Args:
request (google.cloud.errorreporting_v1beta1.types.DeleteEventsRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.DeleteEventsRequest, dict]):
The request object. Deletes all events in the project.
project_name (str):
Required. The resource name of the Google Cloud Platform
@@ -117,7 +117,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)
@@ -81,16 +81,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.
@@ -128,16 +128,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.
@@ -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
@@ -337,7 +337,7 @@ def __init__(

def report_error_event(
self,
request: report_errors_service.ReportErrorEventRequest = None,
request: Union[report_errors_service.ReportErrorEventRequest, dict] = None,
*,
project_name: str = None,
event: report_errors_service.ReportedErrorEvent = None,
@@ -363,7 +363,7 @@ def report_error_event(
regionalized logs </error-reporting/docs/regionalization>`__.
Args:
request (google.cloud.errorreporting_v1beta1.types.ReportErrorEventRequest):
request (Union[google.cloud.errorreporting_v1beta1.types.ReportErrorEventRequest, dict]):
The request object. A request for reporting an
individual error event.
project_name (str):
@@ -117,7 +117,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)
@@ -80,16 +80,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.
@@ -127,16 +127,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,12 +39,12 @@ def partition(
class errorreportingCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'delete_events': ('project_name', ),
'get_group': ('group_name', ),
'list_events': ('project_name', 'group_id', 'service_filter', 'time_range', 'page_size', 'page_token', ),
'list_group_stats': ('project_name', 'group_id', 'service_filter', 'time_range', 'timed_count_duration', 'alignment', 'alignment_time', 'order', 'page_size', 'page_token', ),
'report_error_event': ('project_name', 'event', ),
'update_group': ('group', ),
'delete_events': ('project_name', ),
'get_group': ('group_name', ),
'list_events': ('project_name', 'group_id', 'service_filter', 'time_range', 'page_size', 'page_token', ),
'list_group_stats': ('project_name', 'group_id', 'service_filter', 'time_range', 'timed_count_duration', 'alignment', 'alignment_time', 'order', 'page_size', 'page_token', ),
'report_error_event': ('project_name', 'event', ),
'update_group': ('group', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -63,7 +63,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 253a66f

Please sign in to comment.