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

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#72)
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 c3c0e50 commit 9da978a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 39 deletions.
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 @@ -395,7 +395,9 @@ def __init__(

def create_microsoft_ad_domain(
self,
request: managed_identities_service.CreateMicrosoftAdDomainRequest = None,
request: Union[
managed_identities_service.CreateMicrosoftAdDomainRequest, dict
] = None,
*,
parent: str = None,
domain_name: str = None,
Expand All @@ -407,7 +409,7 @@ def create_microsoft_ad_domain(
r"""Creates a Microsoft AD domain.
Args:
request (google.cloud.managedidentities_v1.types.CreateMicrosoftAdDomainRequest):
request (Union[google.cloud.managedidentities_v1.types.CreateMicrosoftAdDomainRequest, dict]):
The request object. Request message for
[CreateMicrosoftAdDomain][google.cloud.managedidentities.v1.CreateMicrosoftAdDomain]
parent (str):
Expand Down Expand Up @@ -513,7 +515,9 @@ def create_microsoft_ad_domain(

def reset_admin_password(
self,
request: managed_identities_service.ResetAdminPasswordRequest = None,
request: Union[
managed_identities_service.ResetAdminPasswordRequest, dict
] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -523,7 +527,7 @@ def reset_admin_password(
r"""Resets a domain's administrator password.
Args:
request (google.cloud.managedidentities_v1.types.ResetAdminPasswordRequest):
request (Union[google.cloud.managedidentities_v1.types.ResetAdminPasswordRequest, dict]):
The request object. Request message for
[ResetAdminPassword][google.cloud.managedidentities.v1.ResetAdminPassword]
name (str):
Expand Down Expand Up @@ -586,7 +590,7 @@ def reset_admin_password(

def list_domains(
self,
request: managed_identities_service.ListDomainsRequest = None,
request: Union[managed_identities_service.ListDomainsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -596,7 +600,7 @@ def list_domains(
r"""Lists domains in a project.
Args:
request (google.cloud.managedidentities_v1.types.ListDomainsRequest):
request (Union[google.cloud.managedidentities_v1.types.ListDomainsRequest, dict]):
The request object. Request message for
[ListDomains][google.cloud.managedidentities.v1.ListDomains]
parent (str):
Expand Down Expand Up @@ -666,7 +670,7 @@ def list_domains(

def get_domain(
self,
request: managed_identities_service.GetDomainRequest = None,
request: Union[managed_identities_service.GetDomainRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -676,7 +680,7 @@ def get_domain(
r"""Gets information about a domain.
Args:
request (google.cloud.managedidentities_v1.types.GetDomainRequest):
request (Union[google.cloud.managedidentities_v1.types.GetDomainRequest, dict]):
The request object. Request message for
[GetDomain][google.cloud.managedidentities.v1.GetDomain]
name (str):
Expand Down Expand Up @@ -737,7 +741,7 @@ def get_domain(

def update_domain(
self,
request: managed_identities_service.UpdateDomainRequest = None,
request: Union[managed_identities_service.UpdateDomainRequest, dict] = None,
*,
domain: resource.Domain = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -748,7 +752,7 @@ def update_domain(
r"""Updates the metadata and configuration of a domain.
Args:
request (google.cloud.managedidentities_v1.types.UpdateDomainRequest):
request (Union[google.cloud.managedidentities_v1.types.UpdateDomainRequest, dict]):
The request object. Request message for
[UpdateDomain][google.cloud.managedidentities.v1.UpdateDomain]
domain (google.cloud.managedidentities_v1.types.Domain):
Expand Down Expand Up @@ -837,7 +841,7 @@ def update_domain(

def delete_domain(
self,
request: managed_identities_service.DeleteDomainRequest = None,
request: Union[managed_identities_service.DeleteDomainRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -847,7 +851,7 @@ def delete_domain(
r"""Deletes a domain.
Args:
request (google.cloud.managedidentities_v1.types.DeleteDomainRequest):
request (Union[google.cloud.managedidentities_v1.types.DeleteDomainRequest, dict]):
The request object. Request message for
[DeleteDomain][google.cloud.managedidentities.v1.DeleteDomain]
name (str):
Expand Down Expand Up @@ -929,7 +933,7 @@ def delete_domain(

def attach_trust(
self,
request: managed_identities_service.AttachTrustRequest = None,
request: Union[managed_identities_service.AttachTrustRequest, dict] = None,
*,
name: str = None,
trust: resource.Trust = None,
Expand All @@ -940,7 +944,7 @@ def attach_trust(
r"""Adds an AD trust to a domain.
Args:
request (google.cloud.managedidentities_v1.types.AttachTrustRequest):
request (Union[google.cloud.managedidentities_v1.types.AttachTrustRequest, dict]):
The request object. Request message for
[AttachTrust][google.cloud.managedidentities.v1.AttachTrust]
name (str):
Expand Down Expand Up @@ -1020,7 +1024,7 @@ def attach_trust(

def reconfigure_trust(
self,
request: managed_identities_service.ReconfigureTrustRequest = None,
request: Union[managed_identities_service.ReconfigureTrustRequest, dict] = None,
*,
name: str = None,
target_domain_name: str = None,
Expand All @@ -1032,7 +1036,7 @@ def reconfigure_trust(
r"""Updates the DNS conditional forwarder.
Args:
request (google.cloud.managedidentities_v1.types.ReconfigureTrustRequest):
request (Union[google.cloud.managedidentities_v1.types.ReconfigureTrustRequest, dict]):
The request object. Request message for
[ReconfigureTrust][google.cloud.managedidentities.v1.ReconfigureTrust]
name (str):
Expand Down Expand Up @@ -1125,7 +1129,7 @@ def reconfigure_trust(

def detach_trust(
self,
request: managed_identities_service.DetachTrustRequest = None,
request: Union[managed_identities_service.DetachTrustRequest, dict] = None,
*,
name: str = None,
trust: resource.Trust = None,
Expand All @@ -1136,7 +1140,7 @@ def detach_trust(
r"""Removes an AD trust.
Args:
request (google.cloud.managedidentities_v1.types.DetachTrustRequest):
request (Union[google.cloud.managedidentities_v1.types.DetachTrustRequest, dict]):
The request object. Request message for
[DetachTrust][google.cloud.managedidentities.v1.DetachTrust]
name (str):
Expand Down Expand Up @@ -1218,7 +1222,7 @@ def detach_trust(

def validate_trust(
self,
request: managed_identities_service.ValidateTrustRequest = None,
request: Union[managed_identities_service.ValidateTrustRequest, dict] = None,
*,
name: str = None,
trust: resource.Trust = None,
Expand All @@ -1231,7 +1235,7 @@ def validate_trust(
incoming trust requests.
Args:
request (google.cloud.managedidentities_v1.types.ValidateTrustRequest):
request (Union[google.cloud.managedidentities_v1.types.ValidateTrustRequest, dict]):
The request object. Request message for
[ValidateTrust][google.cloud.managedidentities.v1.ValidateTrust]
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 @@ -117,16 +117,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 @@ -164,16 +164,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 scripts/fixup_managedidentities_v1_keywords.py
Expand Up @@ -39,16 +39,16 @@ def partition(
class managedidentitiesCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'attach_trust': ('name', 'trust', ),
'create_microsoft_ad_domain': ('parent', 'domain_name', 'domain', ),
'delete_domain': ('name', ),
'detach_trust': ('name', 'trust', ),
'get_domain': ('name', ),
'list_domains': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'reconfigure_trust': ('name', 'target_domain_name', 'target_dns_ip_addresses', ),
'reset_admin_password': ('name', ),
'update_domain': ('update_mask', 'domain', ),
'validate_trust': ('name', 'trust', ),
'attach_trust': ('name', 'trust', ),
'create_microsoft_ad_domain': ('parent', 'domain_name', 'domain', ),
'delete_domain': ('name', ),
'detach_trust': ('name', 'trust', ),
'get_domain': ('name', ),
'list_domains': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'reconfigure_trust': ('name', 'target_domain_name', 'target_dns_ip_addresses', ),
'reset_admin_password': ('name', ),
'update_domain': ('update_mask', 'domain', ),
'validate_trust': ('name', 'trust', ),
}

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

Please sign in to comment.