diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/client.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/client.py index b8da560ab6a9..02823ea9815e 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/client.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/client.py @@ -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 @@ -358,7 +358,7 @@ def __init__( def search_domains( self, - request: domains.SearchDomainsRequest = None, + request: Union[domains.SearchDomainsRequest, dict] = None, *, location: str = None, query: str = None, @@ -374,7 +374,7 @@ def search_domains( confirm availability. Args: - request (google.cloud.domains_v1beta1.types.SearchDomainsRequest): + request (Union[google.cloud.domains_v1beta1.types.SearchDomainsRequest, dict]): The request object. Request for the `SearchDomains` method. location (str): @@ -442,7 +442,7 @@ def search_domains( def retrieve_register_parameters( self, - request: domains.RetrieveRegisterParametersRequest = None, + request: Union[domains.RetrieveRegisterParametersRequest, dict] = None, *, location: str = None, domain_name: str = None, @@ -455,7 +455,7 @@ def retrieve_register_parameters( call ``RegisterDomain``. Args: - request (google.cloud.domains_v1beta1.types.RetrieveRegisterParametersRequest): + request (Union[google.cloud.domains_v1beta1.types.RetrieveRegisterParametersRequest, dict]): The request object. Request for the `RetrieveRegisterParameters` method. location (str): @@ -526,7 +526,7 @@ def retrieve_register_parameters( def register_domain( self, - request: domains.RegisterDomainRequest = None, + request: Union[domains.RegisterDomainRequest, dict] = None, *, parent: str = None, registration: domains.Registration = None, @@ -551,7 +551,7 @@ def register_domain( and retry registration. Args: - request (google.cloud.domains_v1beta1.types.RegisterDomainRequest): + request (Union[google.cloud.domains_v1beta1.types.RegisterDomainRequest, dict]): The request object. Request for the `RegisterDomain` method. parent (str): @@ -651,7 +651,7 @@ def register_domain( def list_registrations( self, - request: domains.ListRegistrationsRequest = None, + request: Union[domains.ListRegistrationsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -661,7 +661,7 @@ def list_registrations( r"""Lists the ``Registration`` resources in a project. Args: - request (google.cloud.domains_v1beta1.types.ListRegistrationsRequest): + request (Union[google.cloud.domains_v1beta1.types.ListRegistrationsRequest, dict]): The request object. Request for the `ListRegistrations` method. parent (str): @@ -731,7 +731,7 @@ def list_registrations( def get_registration( self, - request: domains.GetRegistrationRequest = None, + request: Union[domains.GetRegistrationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -741,7 +741,7 @@ def get_registration( r"""Gets the details of a ``Registration`` resource. Args: - request (google.cloud.domains_v1beta1.types.GetRegistrationRequest): + request (Union[google.cloud.domains_v1beta1.types.GetRegistrationRequest, dict]): The request object. Request for the `GetRegistration` method. name (str): @@ -810,7 +810,7 @@ def get_registration( def update_registration( self, - request: domains.UpdateRegistrationRequest = None, + request: Union[domains.UpdateRegistrationRequest, dict] = None, *, registration: domains.Registration = None, update_mask: field_mask_pb2.FieldMask = None, @@ -829,7 +829,7 @@ def update_registration( ``ConfigureContactSettings`` Args: - request (google.cloud.domains_v1beta1.types.UpdateRegistrationRequest): + request (Union[google.cloud.domains_v1beta1.types.UpdateRegistrationRequest, dict]): The request object. Request for the `UpdateRegistration` method. registration (google.cloud.domains_v1beta1.types.Registration): @@ -919,7 +919,7 @@ def update_registration( def configure_management_settings( self, - request: domains.ConfigureManagementSettingsRequest = None, + request: Union[domains.ConfigureManagementSettingsRequest, dict] = None, *, registration: str = None, management_settings: domains.ManagementSettings = None, @@ -931,7 +931,7 @@ def configure_management_settings( r"""Updates a ``Registration``'s management settings. Args: - request (google.cloud.domains_v1beta1.types.ConfigureManagementSettingsRequest): + request (Union[google.cloud.domains_v1beta1.types.ConfigureManagementSettingsRequest, dict]): The request object. Request for the `ConfigureManagementSettings` method. registration (str): @@ -1033,7 +1033,7 @@ def configure_management_settings( def configure_dns_settings( self, - request: domains.ConfigureDnsSettingsRequest = None, + request: Union[domains.ConfigureDnsSettingsRequest, dict] = None, *, registration: str = None, dns_settings: domains.DnsSettings = None, @@ -1045,7 +1045,7 @@ def configure_dns_settings( r"""Updates a ``Registration``'s DNS settings. Args: - request (google.cloud.domains_v1beta1.types.ConfigureDnsSettingsRequest): + request (Union[google.cloud.domains_v1beta1.types.ConfigureDnsSettingsRequest, dict]): The request object. Request for the `ConfigureDnsSettings` method. registration (str): @@ -1152,7 +1152,7 @@ def configure_dns_settings( def configure_contact_settings( self, - request: domains.ConfigureContactSettingsRequest = None, + request: Union[domains.ConfigureContactSettingsRequest, dict] = None, *, registration: str = None, contact_settings: domains.ContactSettings = None, @@ -1165,7 +1165,7 @@ def configure_contact_settings( require confirmation by the domain's registrant contact . Args: - request (google.cloud.domains_v1beta1.types.ConfigureContactSettingsRequest): + request (Union[google.cloud.domains_v1beta1.types.ConfigureContactSettingsRequest, dict]): The request object. Request for the `ConfigureContactSettings` method. registration (str): @@ -1267,7 +1267,7 @@ def configure_contact_settings( def export_registration( self, - request: domains.ExportRegistrationRequest = None, + request: Union[domains.ExportRegistrationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1290,7 +1290,7 @@ def export_registration( Domains to renew the domain if needed. Args: - request (google.cloud.domains_v1beta1.types.ExportRegistrationRequest): + request (Union[google.cloud.domains_v1beta1.types.ExportRegistrationRequest, dict]): The request object. Request for the `ExportRegistration` method. name (str): @@ -1369,7 +1369,7 @@ def export_registration( def delete_registration( self, - request: domains.DeleteRegistrationRequest = None, + request: Union[domains.DeleteRegistrationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1385,7 +1385,7 @@ def delete_registration( - ``state`` is ``REGISTRATION_FAILED`` Args: - request (google.cloud.domains_v1beta1.types.DeleteRegistrationRequest): + request (Union[google.cloud.domains_v1beta1.types.DeleteRegistrationRequest, dict]): The request object. Request for the `DeleteRegistration` method. name (str): @@ -1467,7 +1467,7 @@ def delete_registration( def retrieve_authorization_code( self, - request: domains.RetrieveAuthorizationCodeRequest = None, + request: Union[domains.RetrieveAuthorizationCodeRequest, dict] = None, *, registration: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1481,7 +1481,7 @@ def retrieve_authorization_code( the initial domain registration. Args: - request (google.cloud.domains_v1beta1.types.RetrieveAuthorizationCodeRequest): + request (Union[google.cloud.domains_v1beta1.types.RetrieveAuthorizationCodeRequest, dict]): The request object. Request for the `RetrieveAuthorizationCode` method. registration (str): @@ -1545,7 +1545,7 @@ def retrieve_authorization_code( def reset_authorization_code( self, - request: domains.ResetAuthorizationCodeRequest = None, + request: Union[domains.ResetAuthorizationCodeRequest, dict] = None, *, registration: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1559,7 +1559,7 @@ def reset_authorization_code( the initial domain registration. Args: - request (google.cloud.domains_v1beta1.types.ResetAuthorizationCodeRequest): + request (Union[google.cloud.domains_v1beta1.types.ResetAuthorizationCodeRequest, dict]): The request object. Request for the `ResetAuthorizationCode` method. registration (str): diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/base.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/base.py index 0eaf5866e8bd..5a92605c7c71 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/base.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/base.py @@ -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) diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc.py index 3fe57b7d7bfe..43e7dbfe8d73 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc.py @@ -83,16 +83,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. diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc_asyncio.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc_asyncio.py index 09fc1d4453bc..a420fda0b614 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc_asyncio.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/transports/grpc_asyncio.py @@ -130,16 +130,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. diff --git a/packages/google-cloud-domains/scripts/fixup_domains_v1beta1_keywords.py b/packages/google-cloud-domains/scripts/fixup_domains_v1beta1_keywords.py index d1ade465af99..8f86caf5be6d 100644 --- a/packages/google-cloud-domains/scripts/fixup_domains_v1beta1_keywords.py +++ b/packages/google-cloud-domains/scripts/fixup_domains_v1beta1_keywords.py @@ -39,19 +39,19 @@ def partition( class domainsCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'configure_contact_settings': ('registration', 'update_mask', 'contact_settings', 'contact_notices', 'validate_only', ), - 'configure_dns_settings': ('registration', 'update_mask', 'dns_settings', 'validate_only', ), - 'configure_management_settings': ('registration', 'update_mask', 'management_settings', ), - 'delete_registration': ('name', ), - 'export_registration': ('name', ), - 'get_registration': ('name', ), - 'list_registrations': ('parent', 'page_size', 'page_token', 'filter', ), - 'register_domain': ('parent', 'registration', 'yearly_price', 'domain_notices', 'contact_notices', 'validate_only', ), - 'reset_authorization_code': ('registration', ), - 'retrieve_authorization_code': ('registration', ), - 'retrieve_register_parameters': ('domain_name', 'location', ), - 'search_domains': ('query', 'location', ), - 'update_registration': ('update_mask', 'registration', ), + 'configure_contact_settings': ('registration', 'update_mask', 'contact_settings', 'contact_notices', 'validate_only', ), + 'configure_dns_settings': ('registration', 'update_mask', 'dns_settings', 'validate_only', ), + 'configure_management_settings': ('registration', 'update_mask', 'management_settings', ), + 'delete_registration': ('name', ), + 'export_registration': ('name', ), + 'get_registration': ('name', ), + 'list_registrations': ('parent', 'page_size', 'page_token', 'filter', ), + 'register_domain': ('parent', 'registration', 'yearly_price', 'domain_notices', 'contact_notices', 'validate_only', ), + 'reset_authorization_code': ('registration', ), + 'retrieve_authorization_code': ('registration', ), + 'retrieve_register_parameters': ('domain_name', 'location', ), + 'search_domains': ('query', 'location', ), + 'update_registration': ('update_mask', 'registration', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -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 )