Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#27)
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] authored Sep 24, 2021
1 parent d32aa53 commit 75907bb
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 56 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 @@ -346,7 +346,7 @@ def __init__(

def set_iam_policy(
self,
request: iam_policy_pb2.SetIamPolicyRequest = None,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -358,7 +358,7 @@ def set_iam_policy(
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
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.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -453,7 +453,7 @@ def set_iam_policy(

def get_iam_policy(
self,
request: iam_policy_pb2.GetIamPolicyRequest = None,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -465,7 +465,7 @@ def get_iam_policy(
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
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.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -560,7 +560,7 @@ def get_iam_policy(

def test_iam_permissions(
self,
request: iam_policy_pb2.TestIamPermissionsRequest = None,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -572,7 +572,7 @@ def test_iam_permissions(
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
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.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -612,7 +612,7 @@ def test_iam_permissions(

def get_iap_settings(
self,
request: service.GetIapSettingsRequest = None,
request: Union[service.GetIapSettingsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -622,7 +622,7 @@ def get_iap_settings(
resource.
Args:
request (google.cloud.iap_v1.types.GetIapSettingsRequest):
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
The request object. The request sent to GetIapSettings.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -660,7 +660,7 @@ def get_iap_settings(

def update_iap_settings(
self,
request: service.UpdateIapSettingsRequest = None,
request: Union[service.UpdateIapSettingsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -670,7 +670,7 @@ def update_iap_settings(
It replaces all fields unless the ``update_mask`` is set.
Args:
request (google.cloud.iap_v1.types.UpdateIapSettingsRequest):
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
The request object. The request sent to
UpdateIapSettings.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,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 @@ -131,16 +131,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 @@ -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 @@ -348,7 +348,7 @@ def __init__(

def list_brands(
self,
request: service.ListBrandsRequest = None,
request: Union[service.ListBrandsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -357,7 +357,7 @@ def list_brands(
r"""Lists the existing brands for the project.
Args:
request (google.cloud.iap_v1.types.ListBrandsRequest):
request (Union[google.cloud.iap_v1.types.ListBrandsRequest, dict]):
The request object. The request sent to ListBrands.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -395,7 +395,7 @@ def list_brands(

def create_brand(
self,
request: service.CreateBrandRequest = None,
request: Union[service.CreateBrandRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -413,7 +413,7 @@ def create_brand(
by the caller.
Args:
request (google.cloud.iap_v1.types.CreateBrandRequest):
request (Union[google.cloud.iap_v1.types.CreateBrandRequest, dict]):
The request object. The request sent to CreateBrand.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -454,7 +454,7 @@ def create_brand(

def get_brand(
self,
request: service.GetBrandRequest = None,
request: Union[service.GetBrandRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -463,7 +463,7 @@ def get_brand(
r"""Retrieves the OAuth brand of the project.
Args:
request (google.cloud.iap_v1.types.GetBrandRequest):
request (Union[google.cloud.iap_v1.types.GetBrandRequest, dict]):
The request object. The request sent to GetBrand.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -504,7 +504,7 @@ def get_brand(

def create_identity_aware_proxy_client(
self,
request: service.CreateIdentityAwareProxyClientRequest = None,
request: Union[service.CreateIdentityAwareProxyClientRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -516,7 +516,7 @@ def create_identity_aware_proxy_client(
use.
Args:
request (google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest):
request (Union[google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest, dict]):
The request object. The request sent to
CreateIdentityAwareProxyClient.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -559,7 +559,7 @@ def create_identity_aware_proxy_client(

def list_identity_aware_proxy_clients(
self,
request: service.ListIdentityAwareProxyClientsRequest = None,
request: Union[service.ListIdentityAwareProxyClientsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -568,7 +568,7 @@ def list_identity_aware_proxy_clients(
r"""Lists the existing clients for the brand.
Args:
request (google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest):
request (Union[google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest, dict]):
The request object. The request sent to
ListIdentityAwareProxyClients.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -620,7 +620,7 @@ def list_identity_aware_proxy_clients(

def get_identity_aware_proxy_client(
self,
request: service.GetIdentityAwareProxyClientRequest = None,
request: Union[service.GetIdentityAwareProxyClientRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -630,7 +630,7 @@ def get_identity_aware_proxy_client(
Requires that the client is owned by IAP.
Args:
request (google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest):
request (Union[google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest, dict]):
The request object. The request sent to
GetIdentityAwareProxyClient.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -673,7 +673,7 @@ def get_identity_aware_proxy_client(

def reset_identity_aware_proxy_client_secret(
self,
request: service.ResetIdentityAwareProxyClientSecretRequest = None,
request: Union[service.ResetIdentityAwareProxyClientSecretRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -684,7 +684,7 @@ def reset_identity_aware_proxy_client_secret(
that the client is owned by IAP.
Args:
request (google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest):
request (Union[google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest, dict]):
The request object. The request sent to
ResetIdentityAwareProxyClientSecret.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -727,7 +727,7 @@ def reset_identity_aware_proxy_client_secret(

def delete_identity_aware_proxy_client(
self,
request: service.DeleteIdentityAwareProxyClientRequest = None,
request: Union[service.DeleteIdentityAwareProxyClientRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -739,7 +739,7 @@ def delete_identity_aware_proxy_client(
after tests. Requires that the client is owned by IAP.
Args:
request (google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest):
request (Union[google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest, dict]):
The request object. The request sent to
DeleteIdentityAwareProxyClient.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,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 @@ -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
Original file line number Diff line number Diff line change
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
28 changes: 14 additions & 14 deletions packages/google-cloud-iap/scripts/fixup_iap_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ def partition(
class iapCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_brand': ('parent', 'brand', ),
'create_identity_aware_proxy_client': ('parent', 'identity_aware_proxy_client', ),
'delete_identity_aware_proxy_client': ('name', ),
'get_brand': ('name', ),
'get_iam_policy': ('resource', 'options', ),
'get_iap_settings': ('name', ),
'get_identity_aware_proxy_client': ('name', ),
'list_brands': ('parent', ),
'list_identity_aware_proxy_clients': ('parent', 'page_size', 'page_token', ),
'reset_identity_aware_proxy_client_secret': ('name', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
'update_iap_settings': ('iap_settings', 'update_mask', ),
'create_brand': ('parent', 'brand', ),
'create_identity_aware_proxy_client': ('parent', 'identity_aware_proxy_client', ),
'delete_identity_aware_proxy_client': ('name', ),
'get_brand': ('name', ),
'get_iam_policy': ('resource', 'options', ),
'get_iap_settings': ('name', ),
'get_identity_aware_proxy_client': ('name', ),
'list_brands': ('parent', ),
'list_identity_aware_proxy_clients': ('parent', 'page_size', 'page_token', ),
'reset_identity_aware_proxy_client_secret': ('name', ),
'set_iam_policy': ('resource', 'policy', ),
'test_iam_permissions': ('resource', 'permissions', ),
'update_iap_settings': ('iap_settings', 'update_mask', ),
}

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

Please sign in to comment.