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 (#117)
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 151169d commit eb11483
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
26 changes: 13 additions & 13 deletions google/cloud/oslogin_v1/services/os_login_service/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 @@ -365,7 +365,7 @@ def __init__(

def delete_posix_account(
self,
request: oslogin.DeletePosixAccountRequest = None,
request: Union[oslogin.DeletePosixAccountRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -375,7 +375,7 @@ def delete_posix_account(
r"""Deletes a POSIX account.
Args:
request (google.cloud.oslogin_v1.types.DeletePosixAccountRequest):
request (Union[google.cloud.oslogin_v1.types.DeletePosixAccountRequest, dict]):
The request object. A request message for deleting a
POSIX account entry.
name (str):
Expand Down Expand Up @@ -431,7 +431,7 @@ def delete_posix_account(

def delete_ssh_public_key(
self,
request: oslogin.DeleteSshPublicKeyRequest = None,
request: Union[oslogin.DeleteSshPublicKeyRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -441,7 +441,7 @@ def delete_ssh_public_key(
r"""Deletes an SSH public key.
Args:
request (google.cloud.oslogin_v1.types.DeleteSshPublicKeyRequest):
request (Union[google.cloud.oslogin_v1.types.DeleteSshPublicKeyRequest, dict]):
The request object. A request message for deleting an
SSH public key.
name (str):
Expand Down Expand Up @@ -497,7 +497,7 @@ def delete_ssh_public_key(

def get_login_profile(
self,
request: oslogin.GetLoginProfileRequest = None,
request: Union[oslogin.GetLoginProfileRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -508,7 +508,7 @@ def get_login_profile(
to a virtual machine on Google Compute Engine.
Args:
request (google.cloud.oslogin_v1.types.GetLoginProfileRequest):
request (Union[google.cloud.oslogin_v1.types.GetLoginProfileRequest, dict]):
The request object. A request message for retrieving the
login profile information for a user.
name (str):
Expand Down Expand Up @@ -570,7 +570,7 @@ def get_login_profile(

def get_ssh_public_key(
self,
request: oslogin.GetSshPublicKeyRequest = None,
request: Union[oslogin.GetSshPublicKeyRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -580,7 +580,7 @@ def get_ssh_public_key(
r"""Retrieves an SSH public key.
Args:
request (google.cloud.oslogin_v1.types.GetSshPublicKeyRequest):
request (Union[google.cloud.oslogin_v1.types.GetSshPublicKeyRequest, dict]):
The request object. A request message for retrieving an
SSH public key.
name (str):
Expand Down Expand Up @@ -643,7 +643,7 @@ def get_ssh_public_key(

def import_ssh_public_key(
self,
request: oslogin.ImportSshPublicKeyRequest = None,
request: Union[oslogin.ImportSshPublicKeyRequest, dict] = None,
*,
parent: str = None,
ssh_public_key: common.SshPublicKey = None,
Expand All @@ -658,7 +658,7 @@ def import_ssh_public_key(
profile.
Args:
request (google.cloud.oslogin_v1.types.ImportSshPublicKeyRequest):
request (Union[google.cloud.oslogin_v1.types.ImportSshPublicKeyRequest, dict]):
The request object. A request message for importing an
SSH public key.
parent (str):
Expand Down Expand Up @@ -737,7 +737,7 @@ def import_ssh_public_key(

def update_ssh_public_key(
self,
request: oslogin.UpdateSshPublicKeyRequest = None,
request: Union[oslogin.UpdateSshPublicKeyRequest, dict] = None,
*,
name: str = None,
ssh_public_key: common.SshPublicKey = None,
Expand All @@ -750,7 +750,7 @@ def update_ssh_public_key(
information. This method supports patch semantics.
Args:
request (google.cloud.oslogin_v1.types.UpdateSshPublicKeyRequest):
request (Union[google.cloud.oslogin_v1.types.UpdateSshPublicKeyRequest, dict]):
The request object. A request message for updating an
SSH public key.
name (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 @@ -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.
Expand Down
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions scripts/fixup_oslogin_v1_keywords.py
Expand Up @@ -39,12 +39,12 @@ def partition(
class osloginCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'delete_posix_account': ('name', ),
'delete_ssh_public_key': ('name', ),
'get_login_profile': ('name', 'project_id', 'system_id', ),
'get_ssh_public_key': ('name', ),
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', ),
'update_ssh_public_key': ('name', 'ssh_public_key', 'update_mask', ),
'delete_posix_account': ('name', ),
'delete_ssh_public_key': ('name', ),
'get_login_profile': ('name', 'project_id', 'system_id', ),
'get_ssh_public_key': ('name', ),
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', ),
'update_ssh_public_key': ('name', 'ssh_public_key', 'update_mask', ),
}

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

Expand Down

0 comments on commit eb11483

Please sign in to comment.