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

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#31)
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] committed Sep 24, 2021
1 parent 07ef335 commit 6387d7c
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
14 changes: 7 additions & 7 deletions google/cloud/debugger_v2/services/controller2/client.py
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 @@ -356,7 +356,7 @@ def __init__(

def register_debuggee(
self,
request: controller.RegisterDebuggeeRequest = None,
request: Union[controller.RegisterDebuggeeRequest, dict] = None,
*,
debuggee: data.Debuggee = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -377,7 +377,7 @@ def register_debuggee(
re-registration.
Args:
request (google.cloud.debugger_v2.types.RegisterDebuggeeRequest):
request (Union[google.cloud.debugger_v2.types.RegisterDebuggeeRequest, dict]):
The request object. Request to register a debuggee.
debuggee (google.cloud.debugger_v2.types.Debuggee):
Required. Debuggee information to register. The fields
Expand Down Expand Up @@ -430,7 +430,7 @@ def register_debuggee(

def list_active_breakpoints(
self,
request: controller.ListActiveBreakpointsRequest = None,
request: Union[controller.ListActiveBreakpointsRequest, dict] = None,
*,
debuggee_id: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -453,7 +453,7 @@ def list_active_breakpoints(
from the active list to avoid setting those breakpoints again.
Args:
request (google.cloud.debugger_v2.types.ListActiveBreakpointsRequest):
request (Union[google.cloud.debugger_v2.types.ListActiveBreakpointsRequest, dict]):
The request object. Request to list active breakpoints.
debuggee_id (str):
Required. Identifies the debuggee.
Expand Down Expand Up @@ -505,7 +505,7 @@ def list_active_breakpoints(

def update_active_breakpoint(
self,
request: controller.UpdateActiveBreakpointRequest = None,
request: Union[controller.UpdateActiveBreakpointRequest, dict] = None,
*,
debuggee_id: str = None,
breakpoint_: data.Breakpoint = None,
Expand All @@ -524,7 +524,7 @@ def update_active_breakpoint(
to the correct line of code.
Args:
request (google.cloud.debugger_v2.types.UpdateActiveBreakpointRequest):
request (Union[google.cloud.debugger_v2.types.UpdateActiveBreakpointRequest, dict]):
The request object. Request to update an active
breakpoint.
debuggee_id (str):
Expand Down
Expand Up @@ -120,7 +120,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
Expand Up @@ -101,16 +101,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
Expand Up @@ -148,16 +148,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
22 changes: 11 additions & 11 deletions google/cloud/debugger_v2/services/debugger2/client.py
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 @@ -347,7 +347,7 @@ def __init__(

def set_breakpoint(
self,
request: debugger.SetBreakpointRequest = None,
request: Union[debugger.SetBreakpointRequest, dict] = None,
*,
debuggee_id: str = None,
breakpoint_: data.Breakpoint = None,
Expand All @@ -359,7 +359,7 @@ def set_breakpoint(
r"""Sets the breakpoint to the debuggee.
Args:
request (google.cloud.debugger_v2.types.SetBreakpointRequest):
request (Union[google.cloud.debugger_v2.types.SetBreakpointRequest, dict]):
The request object. Request to set a breakpoint
debuggee_id (str):
Required. ID of the debuggee where
Expand Down Expand Up @@ -430,7 +430,7 @@ def set_breakpoint(

def get_breakpoint(
self,
request: debugger.GetBreakpointRequest = None,
request: Union[debugger.GetBreakpointRequest, dict] = None,
*,
debuggee_id: str = None,
breakpoint_id: str = None,
Expand All @@ -442,7 +442,7 @@ def get_breakpoint(
r"""Gets breakpoint information.
Args:
request (google.cloud.debugger_v2.types.GetBreakpointRequest):
request (Union[google.cloud.debugger_v2.types.GetBreakpointRequest, dict]):
The request object. Request to get breakpoint
information.
debuggee_id (str):
Expand Down Expand Up @@ -516,7 +516,7 @@ def get_breakpoint(

def delete_breakpoint(
self,
request: debugger.DeleteBreakpointRequest = None,
request: Union[debugger.DeleteBreakpointRequest, dict] = None,
*,
debuggee_id: str = None,
breakpoint_id: str = None,
Expand All @@ -528,7 +528,7 @@ def delete_breakpoint(
r"""Deletes the breakpoint from the debuggee.
Args:
request (google.cloud.debugger_v2.types.DeleteBreakpointRequest):
request (Union[google.cloud.debugger_v2.types.DeleteBreakpointRequest, dict]):
The request object. Request to delete a breakpoint.
debuggee_id (str):
Required. ID of the debuggee whose
Expand Down Expand Up @@ -594,7 +594,7 @@ def delete_breakpoint(

def list_breakpoints(
self,
request: debugger.ListBreakpointsRequest = None,
request: Union[debugger.ListBreakpointsRequest, dict] = None,
*,
debuggee_id: str = None,
client_version: str = None,
Expand All @@ -605,7 +605,7 @@ def list_breakpoints(
r"""Lists all breakpoints for the debuggee.
Args:
request (google.cloud.debugger_v2.types.ListBreakpointsRequest):
request (Union[google.cloud.debugger_v2.types.ListBreakpointsRequest, dict]):
The request object. Request to list breakpoints.
debuggee_id (str):
Required. ID of the debuggee whose
Expand Down Expand Up @@ -667,7 +667,7 @@ def list_breakpoints(

def list_debuggees(
self,
request: debugger.ListDebuggeesRequest = None,
request: Union[debugger.ListDebuggeesRequest, dict] = None,
*,
project: str = None,
client_version: str = None,
Expand All @@ -678,7 +678,7 @@ def list_debuggees(
r"""Lists all the debuggees that the user has access to.
Args:
request (google.cloud.debugger_v2.types.ListDebuggeesRequest):
request (Union[google.cloud.debugger_v2.types.ListDebuggeesRequest, dict]):
The request object. Request to list debuggees.
project (str):
Required. Project number of a Google
Expand Down
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
Expand Up @@ -93,16 +93,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
Expand Up @@ -140,16 +140,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
18 changes: 9 additions & 9 deletions scripts/fixup_debugger_v2_keywords.py
Expand Up @@ -39,14 +39,14 @@ def partition(
class debuggerCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'delete_breakpoint': ('debuggee_id', 'breakpoint_id', 'client_version', ),
'get_breakpoint': ('debuggee_id', 'breakpoint_id', 'client_version', ),
'list_active_breakpoints': ('debuggee_id', 'wait_token', 'success_on_timeout', ),
'list_breakpoints': ('debuggee_id', 'client_version', 'include_all_users', 'include_inactive', 'action', 'strip_results', 'wait_token', ),
'list_debuggees': ('project', 'client_version', 'include_inactive', ),
'register_debuggee': ('debuggee', ),
'set_breakpoint': ('debuggee_id', 'breakpoint_', 'client_version', ),
'update_active_breakpoint': ('debuggee_id', 'breakpoint_', ),
'delete_breakpoint': ('debuggee_id', 'breakpoint_id', 'client_version', ),
'get_breakpoint': ('debuggee_id', 'breakpoint_id', 'client_version', ),
'list_active_breakpoints': ('debuggee_id', 'wait_token', 'success_on_timeout', ),
'list_breakpoints': ('debuggee_id', 'client_version', 'include_all_users', 'include_inactive', 'action', 'strip_results', 'wait_token', ),
'list_debuggees': ('project', 'client_version', 'include_inactive', ),
'register_debuggee': ('debuggee', ),
'set_breakpoint': ('debuggee_id', 'breakpoint_', 'client_version', ),
'update_active_breakpoint': ('debuggee_id', 'breakpoint_', ),
}

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

Please sign in to comment.