diff --git a/packages/google-cloud-appengine-admin/docs/appengine_admin_v1/types.rst b/packages/google-cloud-appengine-admin/docs/appengine_admin_v1/types.rst index cc6979ecd33f..51f718be11de 100644 --- a/packages/google-cloud-appengine-admin/docs/appengine_admin_v1/types.rst +++ b/packages/google-cloud-appengine-admin/docs/appengine_admin_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Appengine Admin v1 API .. automodule:: google.cloud.appengine_admin_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/async_client.py index a01b26babce3..562386f9d66b 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -157,9 +167,9 @@ def transport(self) -> ApplicationsTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, ApplicationsTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the applications client. @@ -203,11 +213,11 @@ def __init__( async def get_application( self, - request: Union[appengine.GetApplicationRequest, dict] = None, + request: Optional[Union[appengine.GetApplicationRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> application.Application: r"""Gets information about an application. @@ -238,7 +248,7 @@ async def sample_get_application(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetApplicationRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetApplicationRequest, dict]]): The request object. Request message for `Applications.GetApplication`. name (:class:`str`): @@ -305,10 +315,10 @@ async def sample_get_application(): async def create_application( self, - request: Union[appengine.CreateApplicationRequest, dict] = None, + request: Optional[Union[appengine.CreateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates an App Engine application for a Google Cloud Platform @@ -353,7 +363,7 @@ async def sample_create_application(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.CreateApplicationRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.CreateApplicationRequest, dict]]): The request object. Request message for `Applications.CreateApplication`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -402,10 +412,10 @@ async def sample_create_application(): async def update_application( self, - request: Union[appengine.UpdateApplicationRequest, dict] = None, + request: Optional[Union[appengine.UpdateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the specified Application resource. You can update the @@ -448,7 +458,7 @@ async def sample_update_application(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateApplicationRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateApplicationRequest, dict]]): The request object. Request message for `Applications.UpdateApplication`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -503,10 +513,10 @@ async def sample_update_application(): async def repair_application( self, - request: Union[appengine.RepairApplicationRequest, dict] = None, + request: Optional[Union[appengine.RepairApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Recreates the required App Engine features for the specified App @@ -551,7 +561,7 @@ async def sample_repair_application(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.RepairApplicationRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.RepairApplicationRequest, dict]]): The request object. Request message for 'Applications.RepairApplication'. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/client.py index cf1eb83fdaa2..52217f80a45a 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -60,7 +71,7 @@ class ApplicationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ApplicationsTransport]: """Returns an appropriate transport class. @@ -313,7 +324,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ApplicationsTransport, None] = None, + transport: Optional[Union[str, ApplicationsTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -411,11 +422,11 @@ def __init__( def get_application( self, - request: Union[appengine.GetApplicationRequest, dict] = None, + request: Optional[Union[appengine.GetApplicationRequest, dict]] = None, *, - name: str = None, + name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> application.Application: r"""Gets information about an application. @@ -513,10 +524,10 @@ def sample_get_application(): def create_application( self, - request: Union[appengine.CreateApplicationRequest, dict] = None, + request: Optional[Union[appengine.CreateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Creates an App Engine application for a Google Cloud Platform @@ -611,10 +622,10 @@ def sample_create_application(): def update_application( self, - request: Union[appengine.UpdateApplicationRequest, dict] = None, + request: Optional[Union[appengine.UpdateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified Application resource. You can update the @@ -713,10 +724,10 @@ def sample_update_application(): def repair_application( self, - request: Union[appengine.RepairApplicationRequest, dict] = None, + request: Optional[Union[appengine.RepairApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Recreates the required App Engine features for the specified App diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/base.py index f004538f470c..51740eabd727 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc.py index e62a9a37d8be..820cc4dfaf03 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc_asyncio.py index 3e04368a66f3..174802de2b22 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/applications/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class ApplicationsGrpcAsyncIOTransport(ApplicationsTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py index 3b13e69d5216..6695956c0c38 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -165,9 +175,9 @@ def transport(self) -> AuthorizedCertificatesTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, AuthorizedCertificatesTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the authorized certificates client. @@ -211,10 +221,12 @@ def __init__( async def list_authorized_certificates( self, - request: Union[appengine.ListAuthorizedCertificatesRequest, dict] = None, + request: Optional[ + Union[appengine.ListAuthorizedCertificatesRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAuthorizedCertificatesAsyncPager: r"""Lists all SSL certificates the user is authorized to @@ -247,7 +259,7 @@ async def sample_list_authorized_certificates(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListAuthorizedCertificatesRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListAuthorizedCertificatesRequest, dict]]): The request object. Request message for `AuthorizedCertificates.ListAuthorizedCertificates`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -304,10 +316,12 @@ async def sample_list_authorized_certificates(): async def get_authorized_certificate( self, - request: Union[appengine.GetAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.GetAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Gets the specified SSL certificate. @@ -338,7 +352,7 @@ async def sample_get_authorized_certificate(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetAuthorizedCertificateRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetAuthorizedCertificateRequest, dict]]): The request object. Request message for `AuthorizedCertificates.GetAuthorizedCertificate`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -386,10 +400,12 @@ async def sample_get_authorized_certificate(): async def create_authorized_certificate( self, - request: Union[appengine.CreateAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.CreateAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Uploads the specified SSL certificate. @@ -420,7 +436,7 @@ async def sample_create_authorized_certificate(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.CreateAuthorizedCertificateRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.CreateAuthorizedCertificateRequest, dict]]): The request object. Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -468,10 +484,12 @@ async def sample_create_authorized_certificate(): async def update_authorized_certificate( self, - request: Union[appengine.UpdateAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.UpdateAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Updates the specified SSL certificate. To renew a certificate @@ -507,7 +525,7 @@ async def sample_update_authorized_certificate(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateAuthorizedCertificateRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateAuthorizedCertificateRequest, dict]]): The request object. Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -555,10 +573,12 @@ async def sample_update_authorized_certificate(): async def delete_authorized_certificate( self, - request: Union[appengine.DeleteAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.DeleteAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified SSL certificate. @@ -586,7 +606,7 @@ async def sample_delete_authorized_certificate(): await client.delete_authorized_certificate(request=request) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteAuthorizedCertificateRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteAuthorizedCertificateRequest, dict]]): The request object. Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py index 2a5b15ab9e32..815cfc639a24 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -60,7 +71,7 @@ class AuthorizedCertificatesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[AuthorizedCertificatesTransport]: """Returns an appropriate transport class. @@ -316,7 +327,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, AuthorizedCertificatesTransport, None] = None, + transport: Optional[Union[str, AuthorizedCertificatesTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -414,10 +425,12 @@ def __init__( def list_authorized_certificates( self, - request: Union[appengine.ListAuthorizedCertificatesRequest, dict] = None, + request: Optional[ + Union[appengine.ListAuthorizedCertificatesRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAuthorizedCertificatesPager: r"""Lists all SSL certificates the user is authorized to @@ -510,10 +523,12 @@ def sample_list_authorized_certificates(): def get_authorized_certificate( self, - request: Union[appengine.GetAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.GetAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Gets the specified SSL certificate. @@ -595,10 +610,12 @@ def sample_get_authorized_certificate(): def create_authorized_certificate( self, - request: Union[appengine.CreateAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.CreateAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Uploads the specified SSL certificate. @@ -680,10 +697,12 @@ def sample_create_authorized_certificate(): def update_authorized_certificate( self, - request: Union[appengine.UpdateAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.UpdateAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Updates the specified SSL certificate. To renew a certificate @@ -770,10 +789,12 @@ def sample_update_authorized_certificate(): def delete_authorized_certificate( self, - request: Union[appengine.DeleteAuthorizedCertificateRequest, dict] = None, + request: Optional[ + Union[appengine.DeleteAuthorizedCertificateRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified SSL certificate. diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py index 52c17087b8e2..b59421d78d44 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc.py index 01b00607c6df..f887c33eb17e 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc.py @@ -49,14 +49,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -183,8 +183,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc_asyncio.py index 0ba837102835..a76db90a67fc 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/grpc_asyncio.py @@ -51,7 +51,7 @@ class AuthorizedCertificatesGrpcAsyncIOTransport(AuthorizedCertificatesTransport def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -94,15 +94,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py index 4af4c0de2996..c021a2ef8def 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -160,9 +170,9 @@ def transport(self) -> AuthorizedDomainsTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, AuthorizedDomainsTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the authorized domains client. @@ -206,10 +216,10 @@ def __init__( async def list_authorized_domains( self, - request: Union[appengine.ListAuthorizedDomainsRequest, dict] = None, + request: Optional[Union[appengine.ListAuthorizedDomainsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAuthorizedDomainsAsyncPager: r"""Lists all domains the user is authorized to @@ -242,7 +252,7 @@ async def sample_list_authorized_domains(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListAuthorizedDomainsRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListAuthorizedDomainsRequest, dict]]): The request object. Request message for `AuthorizedDomains.ListAuthorizedDomains`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/client.py index aa4cba11d0c6..760bf73704eb 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -58,7 +69,7 @@ class AuthorizedDomainsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[AuthorizedDomainsTransport]: """Returns an appropriate transport class. @@ -314,7 +325,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, AuthorizedDomainsTransport, None] = None, + transport: Optional[Union[str, AuthorizedDomainsTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -412,10 +423,10 @@ def __init__( def list_authorized_domains( self, - request: Union[appengine.ListAuthorizedDomainsRequest, dict] = None, + request: Optional[Union[appengine.ListAuthorizedDomainsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAuthorizedDomainsPager: r"""Lists all domains the user is authorized to diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py index a943beeab1e6..f74f018800fe 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc.py index 69c2624e1978..264e6ae9fdb2 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc.py @@ -48,14 +48,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc_asyncio.py index 823f23672182..ae74509a0b61 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/authorized_domains/transports/grpc_asyncio.py @@ -50,7 +50,7 @@ class AuthorizedDomainsGrpcAsyncIOTransport(AuthorizedDomainsTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -93,15 +93,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py index 272c2272ae53..319e8a8970d7 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -162,9 +172,9 @@ def transport(self) -> DomainMappingsTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, DomainMappingsTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the domain mappings client. @@ -208,10 +218,10 @@ def __init__( async def list_domain_mappings( self, - request: Union[appengine.ListDomainMappingsRequest, dict] = None, + request: Optional[Union[appengine.ListDomainMappingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListDomainMappingsAsyncPager: r"""Lists the domain mappings on an application. @@ -243,7 +253,7 @@ async def sample_list_domain_mappings(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListDomainMappingsRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListDomainMappingsRequest, dict]]): The request object. Request message for `DomainMappings.ListDomainMappings`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -299,10 +309,10 @@ async def sample_list_domain_mappings(): async def get_domain_mapping( self, - request: Union[appengine.GetDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.GetDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> domain_mapping.DomainMapping: r"""Gets the specified domain mapping. @@ -333,7 +343,7 @@ async def sample_get_domain_mapping(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetDomainMappingRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetDomainMappingRequest, dict]]): The request object. Request message for `DomainMappings.GetDomainMapping`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -378,10 +388,10 @@ async def sample_get_domain_mapping(): async def create_domain_mapping( self, - request: Union[appengine.CreateDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.CreateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Maps a domain to an application. A user must be authorized to @@ -419,7 +429,7 @@ async def sample_create_domain_mapping(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.CreateDomainMappingRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.CreateDomainMappingRequest, dict]]): The request object. Request message for `DomainMappings.CreateDomainMapping`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -475,10 +485,10 @@ async def sample_create_domain_mapping(): async def update_domain_mapping( self, - request: Union[appengine.UpdateDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.UpdateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the specified domain mapping. To map an SSL certificate @@ -517,7 +527,7 @@ async def sample_update_domain_mapping(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateDomainMappingRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateDomainMappingRequest, dict]]): The request object. Request message for `DomainMappings.UpdateDomainMapping`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -573,10 +583,10 @@ async def sample_update_domain_mapping(): async def delete_domain_mapping( self, - request: Union[appengine.DeleteDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.DeleteDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes the specified domain mapping. A user must be authorized @@ -613,7 +623,7 @@ async def sample_delete_domain_mapping(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteDomainMappingRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteDomainMappingRequest, dict]]): The request object. Request message for `DomainMappings.DeleteDomainMapping`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/client.py index e5e7e90bcb1d..127254abb882 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -63,7 +74,7 @@ class DomainMappingsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[DomainMappingsTransport]: """Returns an appropriate transport class. @@ -316,7 +327,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, DomainMappingsTransport, None] = None, + transport: Optional[Union[str, DomainMappingsTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -414,10 +425,10 @@ def __init__( def list_domain_mappings( self, - request: Union[appengine.ListDomainMappingsRequest, dict] = None, + request: Optional[Union[appengine.ListDomainMappingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListDomainMappingsPager: r"""Lists the domain mappings on an application. @@ -506,10 +517,10 @@ def sample_list_domain_mappings(): def get_domain_mapping( self, - request: Union[appengine.GetDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.GetDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> domain_mapping.DomainMapping: r"""Gets the specified domain mapping. @@ -586,10 +597,10 @@ def sample_get_domain_mapping(): def create_domain_mapping( self, - request: Union[appengine.CreateDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.CreateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Maps a domain to an application. A user must be authorized to @@ -684,10 +695,10 @@ def sample_create_domain_mapping(): def update_domain_mapping( self, - request: Union[appengine.UpdateDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.UpdateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified domain mapping. To map an SSL certificate @@ -783,10 +794,10 @@ def sample_update_domain_mapping(): def delete_domain_mapping( self, - request: Union[appengine.DeleteDomainMappingRequest, dict] = None, + request: Optional[Union[appengine.DeleteDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes the specified domain mapping. A user must be authorized diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py index a38b79c2d947..9fc3f0c4fc2c 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc.py index 15b61c6a43ce..15236613bdc6 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc_asyncio.py index 80fb4cf9ef32..588ef7bf0b77 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/domain_mappings/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class DomainMappingsGrpcAsyncIOTransport(DomainMappingsTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/async_client.py index c064b0a83a97..140c5c3a62a7 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -160,9 +170,9 @@ def transport(self) -> FirewallTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, FirewallTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the firewall client. @@ -206,10 +216,10 @@ def __init__( async def list_ingress_rules( self, - request: Union[appengine.ListIngressRulesRequest, dict] = None, + request: Optional[Union[appengine.ListIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListIngressRulesAsyncPager: r"""Lists the firewall rules of an application. @@ -241,7 +251,7 @@ async def sample_list_ingress_rules(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListIngressRulesRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListIngressRulesRequest, dict]]): The request object. Request message for `Firewall.ListIngressRules`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -297,10 +307,10 @@ async def sample_list_ingress_rules(): async def batch_update_ingress_rules( self, - request: Union[appengine.BatchUpdateIngressRulesRequest, dict] = None, + request: Optional[Union[appengine.BatchUpdateIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> appengine.BatchUpdateIngressRulesResponse: r"""Replaces the entire firewall ruleset in one bulk operation. This @@ -337,7 +347,7 @@ async def sample_batch_update_ingress_rules(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.BatchUpdateIngressRulesRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.BatchUpdateIngressRulesRequest, dict]]): The request object. Request message for `Firewall.BatchUpdateIngressRules`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -380,10 +390,10 @@ async def sample_batch_update_ingress_rules(): async def create_ingress_rule( self, - request: Union[appengine.CreateIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.CreateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Creates a firewall rule for the application. @@ -414,7 +424,7 @@ async def sample_create_ingress_rule(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.CreateIngressRuleRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.CreateIngressRuleRequest, dict]]): The request object. Request message for `Firewall.CreateIngressRule`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -461,10 +471,10 @@ async def sample_create_ingress_rule(): async def get_ingress_rule( self, - request: Union[appengine.GetIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.GetIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Gets the specified firewall rule. @@ -495,7 +505,7 @@ async def sample_get_ingress_rule(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetIngressRuleRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetIngressRuleRequest, dict]]): The request object. Request message for `Firewall.GetIngressRule`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -542,10 +552,10 @@ async def sample_get_ingress_rule(): async def update_ingress_rule( self, - request: Union[appengine.UpdateIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.UpdateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Updates the specified firewall rule. @@ -576,7 +586,7 @@ async def sample_update_ingress_rule(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateIngressRuleRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateIngressRuleRequest, dict]]): The request object. Request message for `Firewall.UpdateIngressRule`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -623,10 +633,10 @@ async def sample_update_ingress_rule(): async def delete_ingress_rule( self, - request: Union[appengine.DeleteIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.DeleteIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified firewall rule. @@ -654,7 +664,7 @@ async def sample_delete_ingress_rule(): await client.delete_ingress_rule(request=request) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteIngressRuleRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteIngressRuleRequest, dict]]): The request object. Request message for `Firewall.DeleteIngressRule`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/client.py index f0cea226e276..4b1f219af135 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -56,7 +67,7 @@ class FirewallClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[FirewallTransport]: """Returns an appropriate transport class. @@ -320,7 +331,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, FirewallTransport, None] = None, + transport: Optional[Union[str, FirewallTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -418,10 +429,10 @@ def __init__( def list_ingress_rules( self, - request: Union[appengine.ListIngressRulesRequest, dict] = None, + request: Optional[Union[appengine.ListIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListIngressRulesPager: r"""Lists the firewall rules of an application. @@ -510,10 +521,10 @@ def sample_list_ingress_rules(): def batch_update_ingress_rules( self, - request: Union[appengine.BatchUpdateIngressRulesRequest, dict] = None, + request: Optional[Union[appengine.BatchUpdateIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> appengine.BatchUpdateIngressRulesResponse: r"""Replaces the entire firewall ruleset in one bulk operation. This @@ -596,10 +607,10 @@ def sample_batch_update_ingress_rules(): def create_ingress_rule( self, - request: Union[appengine.CreateIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.CreateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Creates a firewall rule for the application. @@ -678,10 +689,10 @@ def sample_create_ingress_rule(): def get_ingress_rule( self, - request: Union[appengine.GetIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.GetIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Gets the specified firewall rule. @@ -760,10 +771,10 @@ def sample_get_ingress_rule(): def update_ingress_rule( self, - request: Union[appengine.UpdateIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.UpdateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Updates the specified firewall rule. @@ -842,10 +853,10 @@ def sample_update_ingress_rule(): def delete_ingress_rule( self, - request: Union[appengine.DeleteIngressRuleRequest, dict] = None, + request: Optional[Union[appengine.DeleteIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes the specified firewall rule. diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/base.py index f643e88982b8..252df364b649 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc.py index 1d755990dab4..35fe7ce02307 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc.py @@ -57,14 +57,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -191,8 +191,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc_asyncio.py index 4d1ca720fa95..c1cabc8377bc 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/firewall/transports/grpc_asyncio.py @@ -59,7 +59,7 @@ class FirewallGrpcAsyncIOTransport(FirewallTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -102,15 +102,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/async_client.py index eee9e3321bad..1cafa52b3175 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -159,9 +169,9 @@ def transport(self) -> InstancesTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, InstancesTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the instances client. @@ -205,10 +215,10 @@ def __init__( async def list_instances( self, - request: Union[appengine.ListInstancesRequest, dict] = None, + request: Optional[Union[appengine.ListInstancesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesAsyncPager: r"""Lists the instances of a version. @@ -244,7 +254,7 @@ async def sample_list_instances(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListInstancesRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListInstancesRequest, dict]]): The request object. Request message for `Instances.ListInstances`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -300,10 +310,10 @@ async def sample_list_instances(): async def get_instance( self, - request: Union[appengine.GetInstanceRequest, dict] = None, + request: Optional[Union[appengine.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> instance.Instance: r"""Gets instance information. @@ -334,7 +344,7 @@ async def sample_get_instance(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetInstanceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetInstanceRequest, dict]]): The request object. Request message for `Instances.GetInstance`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -380,10 +390,10 @@ async def sample_get_instance(): async def delete_instance( self, - request: Union[appengine.DeleteInstanceRequest, dict] = None, + request: Optional[Union[appengine.DeleteInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Stops a running instance. @@ -432,7 +442,7 @@ async def sample_delete_instance(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteInstanceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteInstanceRequest, dict]]): The request object. Request message for `Instances.DeleteInstance`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -495,10 +505,10 @@ async def sample_delete_instance(): async def debug_instance( self, - request: Union[appengine.DebugInstanceRequest, dict] = None, + request: Optional[Union[appengine.DebugInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Enables debugging on a VM instance. This allows you @@ -542,7 +552,7 @@ async def sample_debug_instance(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.DebugInstanceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DebugInstanceRequest, dict]]): The request object. Request message for `Instances.DebugInstance`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/client.py index f12dcbb61260..6e61c63aab97 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -62,7 +73,7 @@ class InstancesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InstancesTransport]: """Returns an appropriate transport class. @@ -339,7 +350,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InstancesTransport, None] = None, + transport: Optional[Union[str, InstancesTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -437,10 +448,10 @@ def __init__( def list_instances( self, - request: Union[appengine.ListInstancesRequest, dict] = None, + request: Optional[Union[appengine.ListInstancesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists the instances of a version. @@ -533,10 +544,10 @@ def sample_list_instances(): def get_instance( self, - request: Union[appengine.GetInstanceRequest, dict] = None, + request: Optional[Union[appengine.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> instance.Instance: r"""Gets instance information. @@ -614,10 +625,10 @@ def sample_get_instance(): def delete_instance( self, - request: Union[appengine.DeleteInstanceRequest, dict] = None, + request: Optional[Union[appengine.DeleteInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Stops a running instance. @@ -730,10 +741,10 @@ def sample_delete_instance(): def debug_instance( self, - request: Union[appengine.DebugInstanceRequest, dict] = None, + request: Optional[Union[appengine.DebugInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Enables debugging on a VM instance. This allows you diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/base.py index e8492c587a47..31325b39c2a9 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc.py index 4cc0dc382b1c..029a436f70e3 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc_asyncio.py index 01c418a039d5..c1bedd2ced20 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/instances/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class InstancesGrpcAsyncIOTransport(InstancesTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/async_client.py index 636c963e77e2..242c602b6b73 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -155,9 +165,9 @@ def transport(self) -> ServicesTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, ServicesTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the services client. @@ -201,10 +211,10 @@ def __init__( async def list_services( self, - request: Union[appengine.ListServicesRequest, dict] = None, + request: Optional[Union[appengine.ListServicesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListServicesAsyncPager: r"""Lists all the services in the application. @@ -236,7 +246,7 @@ async def sample_list_services(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListServicesRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListServicesRequest, dict]]): The request object. Request message for `Services.ListServices`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -292,10 +302,10 @@ async def sample_list_services(): async def get_service( self, - request: Union[appengine.GetServiceRequest, dict] = None, + request: Optional[Union[appengine.GetServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> service.Service: r"""Gets the current configuration of the specified @@ -327,7 +337,7 @@ async def sample_get_service(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetServiceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetServiceRequest, dict]]): The request object. Request message for `Services.GetService`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -382,10 +392,10 @@ async def sample_get_service(): async def update_service( self, - request: Union[appengine.UpdateServiceRequest, dict] = None, + request: Optional[Union[appengine.UpdateServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the configuration of the specified service. @@ -420,7 +430,7 @@ async def sample_update_service(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateServiceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateServiceRequest, dict]]): The request object. Request message for `Services.UpdateService`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -482,10 +492,10 @@ async def sample_update_service(): async def delete_service( self, - request: Union[appengine.DeleteServiceRequest, dict] = None, + request: Optional[Union[appengine.DeleteServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes the specified service and all enclosed @@ -521,7 +531,7 @@ async def sample_delete_service(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteServiceRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteServiceRequest, dict]]): The request object. Request message for `Services.DeleteService`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/client.py index 0c47b3fe8d89..b1beb5cb387c 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -62,7 +73,7 @@ class ServicesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ServicesTransport]: """Returns an appropriate transport class. @@ -315,7 +326,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ServicesTransport, None] = None, + transport: Optional[Union[str, ServicesTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -413,10 +424,10 @@ def __init__( def list_services( self, - request: Union[appengine.ListServicesRequest, dict] = None, + request: Optional[Union[appengine.ListServicesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListServicesPager: r"""Lists all the services in the application. @@ -505,10 +516,10 @@ def sample_list_services(): def get_service( self, - request: Union[appengine.GetServiceRequest, dict] = None, + request: Optional[Union[appengine.GetServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> service.Service: r"""Gets the current configuration of the specified @@ -596,10 +607,10 @@ def sample_get_service(): def update_service( self, - request: Union[appengine.UpdateServiceRequest, dict] = None, + request: Optional[Union[appengine.UpdateServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the configuration of the specified service. @@ -697,10 +708,10 @@ def sample_update_service(): def delete_service( self, - request: Union[appengine.DeleteServiceRequest, dict] = None, + request: Optional[Union[appengine.DeleteServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes the specified service and all enclosed diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/base.py index 3b68e2bf84ba..f6eb783a7260 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc.py index f35d7c852b23..ae77bde2b364 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc_asyncio.py index 92c4ff3630e0..3013788e6c8c 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/services/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class ServicesGrpcAsyncIOTransport(ServicesTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/async_client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/async_client.py index fc652e5c2891..71f50d0b40b3 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/async_client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/async_client.py @@ -16,7 +16,17 @@ from collections import OrderedDict import functools import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, +) from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -157,9 +167,9 @@ def transport(self) -> VersionsTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, VersionsTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the versions client. @@ -203,10 +213,10 @@ def __init__( async def list_versions( self, - request: Union[appengine.ListVersionsRequest, dict] = None, + request: Optional[Union[appengine.ListVersionsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVersionsAsyncPager: r"""Lists the versions of a service. @@ -238,7 +248,7 @@ async def sample_list_versions(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.ListVersionsRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.ListVersionsRequest, dict]]): The request object. Request message for `Versions.ListVersions`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -294,10 +304,10 @@ async def sample_list_versions(): async def get_version( self, - request: Union[appengine.GetVersionRequest, dict] = None, + request: Optional[Union[appengine.GetVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> version.Version: r"""Gets the specified Version resource. By default, only a @@ -330,7 +340,7 @@ async def sample_get_version(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.GetVersionRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.GetVersionRequest, dict]]): The request object. Request message for `Versions.GetVersion`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -376,10 +386,10 @@ async def sample_get_version(): async def create_version( self, - request: Union[appengine.CreateVersionRequest, dict] = None, + request: Optional[Union[appengine.CreateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deploys code and resource files to a new version. @@ -414,7 +424,7 @@ async def sample_create_version(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.CreateVersionRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.CreateVersionRequest, dict]]): The request object. Request message for `Versions.CreateVersion`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -469,10 +479,10 @@ async def sample_create_version(): async def update_version( self, - request: Union[appengine.UpdateVersionRequest, dict] = None, + request: Optional[Union[appengine.UpdateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the specified Version resource. You can specify the @@ -542,7 +552,7 @@ async def sample_update_version(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.UpdateVersionRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.UpdateVersionRequest, dict]]): The request object. Request message for `Versions.UpdateVersion`. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -597,10 +607,10 @@ async def sample_update_version(): async def delete_version( self, - request: Union[appengine.DeleteVersionRequest, dict] = None, + request: Optional[Union[appengine.DeleteVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes an existing Version resource. @@ -635,7 +645,7 @@ async def sample_delete_version(): print(response) Args: - request (Union[google.cloud.appengine_admin_v1.types.DeleteVersionRequest, dict]): + request (Optional[Union[google.cloud.appengine_admin_v1.types.DeleteVersionRequest, dict]]): The request object. Request message for `Versions.DeleteVersion`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/client.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/client.py index e765f7507fdb..0425e5190804 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/client.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions @@ -64,7 +75,7 @@ class VersionsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[VersionsTransport]: """Returns an appropriate transport class. @@ -317,7 +328,7 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, VersionsTransport, None] = None, + transport: Optional[Union[str, VersionsTransport]] = None, client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: @@ -415,10 +426,10 @@ def __init__( def list_versions( self, - request: Union[appengine.ListVersionsRequest, dict] = None, + request: Optional[Union[appengine.ListVersionsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListVersionsPager: r"""Lists the versions of a service. @@ -507,10 +518,10 @@ def sample_list_versions(): def get_version( self, - request: Union[appengine.GetVersionRequest, dict] = None, + request: Optional[Union[appengine.GetVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> version.Version: r"""Gets the specified Version resource. By default, only a @@ -590,10 +601,10 @@ def sample_get_version(): def create_version( self, - request: Union[appengine.CreateVersionRequest, dict] = None, + request: Optional[Union[appengine.CreateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deploys code and resource files to a new version. @@ -684,10 +695,10 @@ def sample_create_version(): def update_version( self, - request: Union[appengine.UpdateVersionRequest, dict] = None, + request: Optional[Union[appengine.UpdateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified Version resource. You can specify the @@ -813,10 +824,10 @@ def sample_update_version(): def delete_version( self, - request: Union[appengine.DeleteVersionRequest, dict] = None, + request: Optional[Union[appengine.DeleteVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes an existing Version resource. diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/base.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/base.py index d9ae526034b1..1addb341e065 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/base.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/base.py @@ -53,7 +53,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc.py index c31a65108988..95db7900b4f6 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc.py @@ -47,14 +47,14 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - channel: grpc.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[grpc.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, @@ -182,8 +182,8 @@ def __init__( def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc_asyncio.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc_asyncio.py index b33f64fd6c8c..f0f1e64301dc 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc_asyncio.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/services/versions/transports/grpc_asyncio.py @@ -49,7 +49,7 @@ class VersionsGrpcAsyncIOTransport(VersionsTransport): def create_channel( cls, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, @@ -92,15 +92,15 @@ def __init__( self, *, host: str = "appengine.googleapis.com", - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, - channel: aio.Channel = None, - api_mtls_endpoint: str = None, - client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, - ssl_channel_credentials: grpc.ChannelCredentials = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, - quota_project_id=None, + channel: Optional[aio.Channel] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, api_audience: Optional[str] = None, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/app_yaml.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/app_yaml.py index 7afff2e1a7f4..1f1f30fa2563 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/app_yaml.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/app_yaml.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore import proto # type: ignore @@ -82,26 +84,26 @@ class ApiConfigHandler(proto.Message): URL to serve the endpoint at. """ - auth_fail_action = proto.Field( + auth_fail_action: "AuthFailAction" = proto.Field( proto.ENUM, number=1, enum="AuthFailAction", ) - login = proto.Field( + login: "LoginRequirement" = proto.Field( proto.ENUM, number=2, enum="LoginRequirement", ) - script = proto.Field( + script: str = proto.Field( proto.STRING, number=3, ) - security_level = proto.Field( + security_level: "SecurityLevel" = proto.Field( proto.ENUM, number=4, enum="SecurityLevel", ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=5, ) @@ -129,16 +131,16 @@ class ErrorCode(proto.Enum): ERROR_CODE_DOS_API_DENIAL = 2 ERROR_CODE_TIMEOUT = 3 - error_code = proto.Field( + error_code: ErrorCode = proto.Field( proto.ENUM, number=1, enum=ErrorCode, ) - static_file = proto.Field( + static_file: str = proto.Field( proto.STRING, number=2, ) - mime_type = proto.Field( + mime_type: str = proto.Field( proto.STRING, number=3, ) @@ -203,44 +205,44 @@ class RedirectHttpResponseCode(proto.Enum): REDIRECT_HTTP_RESPONSE_CODE_303 = 3 REDIRECT_HTTP_RESPONSE_CODE_307 = 4 - url_regex = proto.Field( + url_regex: str = proto.Field( proto.STRING, number=1, ) - static_files = proto.Field( + static_files: "StaticFilesHandler" = proto.Field( proto.MESSAGE, number=2, oneof="handler_type", message="StaticFilesHandler", ) - script = proto.Field( + script: "ScriptHandler" = proto.Field( proto.MESSAGE, number=3, oneof="handler_type", message="ScriptHandler", ) - api_endpoint = proto.Field( + api_endpoint: "ApiEndpointHandler" = proto.Field( proto.MESSAGE, number=4, oneof="handler_type", message="ApiEndpointHandler", ) - security_level = proto.Field( + security_level: "SecurityLevel" = proto.Field( proto.ENUM, number=5, enum="SecurityLevel", ) - login = proto.Field( + login: "LoginRequirement" = proto.Field( proto.ENUM, number=6, enum="LoginRequirement", ) - auth_fail_action = proto.Field( + auth_fail_action: "AuthFailAction" = proto.Field( proto.ENUM, number=7, enum="AuthFailAction", ) - redirect_http_response_code = proto.Field( + redirect_http_response_code: RedirectHttpResponseCode = proto.Field( proto.ENUM, number=8, enum=RedirectHttpResponseCode, @@ -263,7 +265,7 @@ class StaticFilesHandler(proto.Message): Regular expression that matches the file paths for all files that should be referenced by this handler. - http_headers (Mapping[str, str]): + http_headers (MutableMapping[str, str]): HTTP headers to use for all responses from these URLs. mime_type (str): @@ -288,33 +290,33 @@ class StaticFilesHandler(proto.Message): resource quotas. """ - path = proto.Field( + path: str = proto.Field( proto.STRING, number=1, ) - upload_path_regex = proto.Field( + upload_path_regex: str = proto.Field( proto.STRING, number=2, ) - http_headers = proto.MapField( + http_headers: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=3, ) - mime_type = proto.Field( + mime_type: str = proto.Field( proto.STRING, number=4, ) - expiration = proto.Field( + expiration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=5, message=duration_pb2.Duration, ) - require_matching_file = proto.Field( + require_matching_file: bool = proto.Field( proto.BOOL, number=6, ) - application_readable = proto.Field( + application_readable: bool = proto.Field( proto.BOOL, number=7, ) @@ -330,7 +332,7 @@ class ScriptHandler(proto.Message): directory. """ - script_path = proto.Field( + script_path: str = proto.Field( proto.STRING, number=1, ) @@ -345,7 +347,7 @@ class ApiEndpointHandler(proto.Message): directory. """ - script_path = proto.Field( + script_path: str = proto.Field( proto.STRING, number=1, ) @@ -379,32 +381,32 @@ class HealthCheck(proto.Message): failed. """ - disable_health_check = proto.Field( + disable_health_check: bool = proto.Field( proto.BOOL, number=1, ) - host = proto.Field( + host: str = proto.Field( proto.STRING, number=2, ) - healthy_threshold = proto.Field( + healthy_threshold: int = proto.Field( proto.UINT32, number=3, ) - unhealthy_threshold = proto.Field( + unhealthy_threshold: int = proto.Field( proto.UINT32, number=4, ) - restart_threshold = proto.Field( + restart_threshold: int = proto.Field( proto.UINT32, number=5, ) - check_interval = proto.Field( + check_interval: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=6, message=duration_pb2.Duration, ) - timeout = proto.Field( + timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=7, message=duration_pb2.Duration, @@ -438,33 +440,33 @@ class ReadinessCheck(proto.Message): healthcheck until it is ready to serve traffic. """ - path = proto.Field( + path: str = proto.Field( proto.STRING, number=1, ) - host = proto.Field( + host: str = proto.Field( proto.STRING, number=2, ) - failure_threshold = proto.Field( + failure_threshold: int = proto.Field( proto.UINT32, number=3, ) - success_threshold = proto.Field( + success_threshold: int = proto.Field( proto.UINT32, number=4, ) - check_interval = proto.Field( + check_interval: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=5, message=duration_pb2.Duration, ) - timeout = proto.Field( + timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=6, message=duration_pb2.Duration, ) - app_start_timeout = proto.Field( + app_start_timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=7, message=duration_pb2.Duration, @@ -496,33 +498,33 @@ class LivenessCheck(proto.Message): the checks. """ - path = proto.Field( + path: str = proto.Field( proto.STRING, number=1, ) - host = proto.Field( + host: str = proto.Field( proto.STRING, number=2, ) - failure_threshold = proto.Field( + failure_threshold: int = proto.Field( proto.UINT32, number=3, ) - success_threshold = proto.Field( + success_threshold: int = proto.Field( proto.UINT32, number=4, ) - check_interval = proto.Field( + check_interval: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=5, message=duration_pb2.Duration, ) - timeout = proto.Field( + timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=6, message=duration_pb2.Duration, ) - initial_delay = proto.Field( + initial_delay: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=7, message=duration_pb2.Duration, @@ -541,11 +543,11 @@ class Library(proto.Message): "latest". """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - version = proto.Field( + version: str = proto.Field( proto.STRING, number=2, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/appengine.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/appengine.py index e706bc6737be..3b24d8eedf66 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/appengine.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/appengine.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import field_mask_pb2 # type: ignore import proto # type: ignore @@ -108,7 +110,7 @@ class GetApplicationRequest(proto.Message): ``apps/myapp``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -122,7 +124,7 @@ class CreateApplicationRequest(proto.Message): Application configuration. """ - application = proto.Field( + application: ga_application.Application = proto.Field( proto.MESSAGE, number=2, message=ga_application.Application, @@ -144,16 +146,16 @@ class UpdateApplicationRequest(proto.Message): fields to be updated. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - application = proto.Field( + application: ga_application.Application = proto.Field( proto.MESSAGE, number=2, message=ga_application.Application, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, @@ -168,7 +170,7 @@ class RepairApplicationRequest(proto.Message): Name of the application to repair. Example: ``apps/myapp`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -188,15 +190,15 @@ class ListServicesRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) @@ -206,7 +208,7 @@ class ListServicesResponse(proto.Message): r"""Response message for ``Services.ListServices``. Attributes: - services (Sequence[google.cloud.appengine_admin_v1.types.Service]): + services (MutableSequence[google.cloud.appengine_admin_v1.types.Service]): The services belonging to the requested application. next_page_token (str): @@ -218,12 +220,12 @@ class ListServicesResponse(proto.Message): def raw_page(self): return self - services = proto.RepeatedField( + services: MutableSequence[ga_service.Service] = proto.RepeatedField( proto.MESSAGE, number=1, message=ga_service.Service, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -238,7 +240,7 @@ class GetServiceRequest(proto.Message): ``apps/myapp/services/default``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -275,21 +277,21 @@ class UpdateServiceRequest(proto.Message): Traffic `__. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - service = proto.Field( + service: ga_service.Service = proto.Field( proto.MESSAGE, number=2, message=ga_service.Service, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, ) - migrate_traffic = proto.Field( + migrate_traffic: bool = proto.Field( proto.BOOL, number=4, ) @@ -304,7 +306,7 @@ class DeleteServiceRequest(proto.Message): ``apps/myapp/services/default``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -327,20 +329,20 @@ class ListVersionsRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - view = proto.Field( + view: "VersionView" = proto.Field( proto.ENUM, number=2, enum="VersionView", ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=3, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=4, ) @@ -350,7 +352,7 @@ class ListVersionsResponse(proto.Message): r"""Response message for ``Versions.ListVersions``. Attributes: - versions (Sequence[google.cloud.appengine_admin_v1.types.Version]): + versions (MutableSequence[google.cloud.appengine_admin_v1.types.Version]): The versions belonging to the requested service. next_page_token (str): @@ -362,12 +364,12 @@ class ListVersionsResponse(proto.Message): def raw_page(self): return self - versions = proto.RepeatedField( + versions: MutableSequence[ga_version.Version] = proto.RepeatedField( proto.MESSAGE, number=1, message=ga_version.Version, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -384,11 +386,11 @@ class GetVersionRequest(proto.Message): Controls the set of fields returned in the ``Get`` response. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - view = proto.Field( + view: "VersionView" = proto.Field( proto.ENUM, number=2, enum="VersionView", @@ -406,11 +408,11 @@ class CreateVersionRequest(proto.Message): Application deployment configuration. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - version = proto.Field( + version: ga_version.Version = proto.Field( proto.MESSAGE, number=2, message=ga_version.Version, @@ -433,16 +435,16 @@ class UpdateVersionRequest(proto.Message): be updated. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - version = proto.Field( + version: ga_version.Version = proto.Field( proto.MESSAGE, number=2, message=ga_version.Version, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, @@ -458,7 +460,7 @@ class DeleteVersionRequest(proto.Message): ``apps/myapp/services/default/versions/v1``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -478,15 +480,15 @@ class ListInstancesRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) @@ -496,7 +498,7 @@ class ListInstancesResponse(proto.Message): r"""Response message for ``Instances.ListInstances``. Attributes: - instances (Sequence[google.cloud.appengine_admin_v1.types.Instance]): + instances (MutableSequence[google.cloud.appengine_admin_v1.types.Instance]): The instances belonging to the requested version. next_page_token (str): @@ -508,12 +510,12 @@ class ListInstancesResponse(proto.Message): def raw_page(self): return self - instances = proto.RepeatedField( + instances: MutableSequence[instance.Instance] = proto.RepeatedField( proto.MESSAGE, number=1, message=instance.Instance, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -528,7 +530,7 @@ class GetInstanceRequest(proto.Message): ``apps/myapp/services/default/versions/v1/instances/instance-1``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -543,7 +545,7 @@ class DeleteInstanceRequest(proto.Message): ``apps/myapp/services/default/versions/v1/instances/instance-1``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -566,11 +568,11 @@ class DebugInstanceRequest(proto.Message): Keys `__. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - ssh_key = proto.Field( + ssh_key: str = proto.Field( proto.STRING, number=2, ) @@ -595,19 +597,19 @@ class ListIngressRulesRequest(proto.Message): on requests from this IP. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) - matching_address = proto.Field( + matching_address: str = proto.Field( proto.STRING, number=4, ) @@ -617,7 +619,7 @@ class ListIngressRulesResponse(proto.Message): r"""Response message for ``Firewall.ListIngressRules``. Attributes: - ingress_rules (Sequence[google.cloud.appengine_admin_v1.types.FirewallRule]): + ingress_rules (MutableSequence[google.cloud.appengine_admin_v1.types.FirewallRule]): The ingress FirewallRules for this application. next_page_token (str): @@ -629,12 +631,12 @@ class ListIngressRulesResponse(proto.Message): def raw_page(self): return self - ingress_rules = proto.RepeatedField( + ingress_rules: MutableSequence[firewall.FirewallRule] = proto.RepeatedField( proto.MESSAGE, number=1, message=firewall.FirewallRule, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -647,16 +649,16 @@ class BatchUpdateIngressRulesRequest(proto.Message): name (str): Name of the Firewall collection to set. Example: ``apps/myapp/firewall/ingressRules``. - ingress_rules (Sequence[google.cloud.appengine_admin_v1.types.FirewallRule]): + ingress_rules (MutableSequence[google.cloud.appengine_admin_v1.types.FirewallRule]): A list of FirewallRules to replace the existing set. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - ingress_rules = proto.RepeatedField( + ingress_rules: MutableSequence[firewall.FirewallRule] = proto.RepeatedField( proto.MESSAGE, number=2, message=firewall.FirewallRule, @@ -667,12 +669,12 @@ class BatchUpdateIngressRulesResponse(proto.Message): r"""Response message for ``Firewall.UpdateAllIngressRules``. Attributes: - ingress_rules (Sequence[google.cloud.appengine_admin_v1.types.FirewallRule]): + ingress_rules (MutableSequence[google.cloud.appengine_admin_v1.types.FirewallRule]): The full list of ingress FirewallRules for this application. """ - ingress_rules = proto.RepeatedField( + ingress_rules: MutableSequence[firewall.FirewallRule] = proto.RepeatedField( proto.MESSAGE, number=1, message=firewall.FirewallRule, @@ -701,11 +703,11 @@ class CreateIngressRuleRequest(proto.Message): or deny-all rule. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - rule = proto.Field( + rule: firewall.FirewallRule = proto.Field( proto.MESSAGE, number=2, message=firewall.FirewallRule, @@ -721,7 +723,7 @@ class GetIngressRuleRequest(proto.Message): ``apps/myapp/firewall/ingressRules/100``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -742,16 +744,16 @@ class UpdateIngressRuleRequest(proto.Message): be updated. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - rule = proto.Field( + rule: firewall.FirewallRule = proto.Field( proto.MESSAGE, number=2, message=firewall.FirewallRule, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, @@ -767,7 +769,7 @@ class DeleteIngressRuleRequest(proto.Message): ``apps/myapp/firewall/ingressRules/100``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -787,15 +789,15 @@ class ListAuthorizedDomainsRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) @@ -805,7 +807,7 @@ class ListAuthorizedDomainsResponse(proto.Message): r"""Response message for ``AuthorizedDomains.ListAuthorizedDomains``. Attributes: - domains (Sequence[google.cloud.appengine_admin_v1.types.AuthorizedDomain]): + domains (MutableSequence[google.cloud.appengine_admin_v1.types.AuthorizedDomain]): The authorized domains belonging to the user. next_page_token (str): Continuation token for fetching the next page @@ -816,12 +818,12 @@ class ListAuthorizedDomainsResponse(proto.Message): def raw_page(self): return self - domains = proto.RepeatedField( + domains: MutableSequence[domain.AuthorizedDomain] = proto.RepeatedField( proto.MESSAGE, number=1, message=domain.AuthorizedDomain, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -845,20 +847,20 @@ class ListAuthorizedCertificatesRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - view = proto.Field( + view: "AuthorizedCertificateView" = proto.Field( proto.ENUM, number=4, enum="AuthorizedCertificateView", ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) @@ -869,7 +871,7 @@ class ListAuthorizedCertificatesResponse(proto.Message): ``AuthorizedCertificates.ListAuthorizedCertificates``. Attributes: - certificates (Sequence[google.cloud.appengine_admin_v1.types.AuthorizedCertificate]): + certificates (MutableSequence[google.cloud.appengine_admin_v1.types.AuthorizedCertificate]): The SSL certificates the user is authorized to administer. next_page_token (str): @@ -881,12 +883,14 @@ class ListAuthorizedCertificatesResponse(proto.Message): def raw_page(self): return self - certificates = proto.RepeatedField( + certificates: MutableSequence[ + ga_certificate.AuthorizedCertificate + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=ga_certificate.AuthorizedCertificate, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -904,11 +908,11 @@ class GetAuthorizedCertificateRequest(proto.Message): Controls the set of fields returned in the ``GET`` response. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - view = proto.Field( + view: "AuthorizedCertificateView" = proto.Field( proto.ENUM, number=2, enum="AuthorizedCertificateView", @@ -927,11 +931,11 @@ class CreateAuthorizedCertificateRequest(proto.Message): SSL certificate data. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - certificate = proto.Field( + certificate: ga_certificate.AuthorizedCertificate = proto.Field( proto.MESSAGE, number=2, message=ga_certificate.AuthorizedCertificate, @@ -955,16 +959,16 @@ class UpdateAuthorizedCertificateRequest(proto.Message): and ``display_name`` fields. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - certificate = proto.Field( + certificate: ga_certificate.AuthorizedCertificate = proto.Field( proto.MESSAGE, number=2, message=ga_certificate.AuthorizedCertificate, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, @@ -981,7 +985,7 @@ class DeleteAuthorizedCertificateRequest(proto.Message): ``apps/myapp/authorizedCertificates/12345``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -1001,15 +1005,15 @@ class ListDomainMappingsRequest(proto.Message): of results. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - page_size = proto.Field( + page_size: int = proto.Field( proto.INT32, number=2, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=3, ) @@ -1019,7 +1023,7 @@ class ListDomainMappingsResponse(proto.Message): r"""Response message for ``DomainMappings.ListDomainMappings``. Attributes: - domain_mappings (Sequence[google.cloud.appengine_admin_v1.types.DomainMapping]): + domain_mappings (MutableSequence[google.cloud.appengine_admin_v1.types.DomainMapping]): The domain mappings for the application. next_page_token (str): Continuation token for fetching the next page @@ -1030,12 +1034,14 @@ class ListDomainMappingsResponse(proto.Message): def raw_page(self): return self - domain_mappings = proto.RepeatedField( + domain_mappings: MutableSequence[ + ga_domain_mapping.DomainMapping + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=ga_domain_mapping.DomainMapping, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -1050,7 +1056,7 @@ class GetDomainMappingRequest(proto.Message): ``apps/myapp/domainMappings/example.com``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -1071,16 +1077,16 @@ class CreateDomainMappingRequest(proto.Message): default, overrides are rejected. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - domain_mapping = proto.Field( + domain_mapping: ga_domain_mapping.DomainMapping = proto.Field( proto.MESSAGE, number=2, message=ga_domain_mapping.DomainMapping, ) - override_strategy = proto.Field( + override_strategy: "DomainOverrideStrategy" = proto.Field( proto.ENUM, number=4, enum="DomainOverrideStrategy", @@ -1103,16 +1109,16 @@ class UpdateDomainMappingRequest(proto.Message): fields to be updated. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - domain_mapping = proto.Field( + domain_mapping: ga_domain_mapping.DomainMapping = proto.Field( proto.MESSAGE, number=2, message=ga_domain_mapping.DomainMapping, ) - update_mask = proto.Field( + update_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, @@ -1128,7 +1134,7 @@ class DeleteDomainMappingRequest(proto.Message): ``apps/myapp/domainMappings/example.com``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/application.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/application.py index c51e52e3089b..42064077c48c 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/application.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/application.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore import proto # type: ignore @@ -40,7 +42,7 @@ class Application(proto.Message): equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: ``myapp``. - dispatch_rules (Sequence[google.cloud.appengine_admin_v1.types.UrlDispatchRule]): + dispatch_rules (MutableSequence[google.cloud.appengine_admin_v1.types.UrlDispatchRule]): HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. @@ -142,19 +144,19 @@ class IdentityAwareProxy(proto.Message): @OutputOnly """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1, ) - oauth2_client_id = proto.Field( + oauth2_client_id: str = proto.Field( proto.STRING, number=2, ) - oauth2_client_secret = proto.Field( + oauth2_client_secret: str = proto.Field( proto.STRING, number=3, ) - oauth2_client_secret_sha256 = proto.Field( + oauth2_client_secret_sha256: str = proto.Field( proto.STRING, number=4, ) @@ -177,77 +179,77 @@ class FeatureSettings(proto.Message): base image for VMs, rather than a base Debian image. """ - split_health_checks = proto.Field( + split_health_checks: bool = proto.Field( proto.BOOL, number=1, ) - use_container_optimized_os = proto.Field( + use_container_optimized_os: bool = proto.Field( proto.BOOL, number=2, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - dispatch_rules = proto.RepeatedField( + dispatch_rules: MutableSequence["UrlDispatchRule"] = proto.RepeatedField( proto.MESSAGE, number=3, message="UrlDispatchRule", ) - auth_domain = proto.Field( + auth_domain: str = proto.Field( proto.STRING, number=6, ) - location_id = proto.Field( + location_id: str = proto.Field( proto.STRING, number=7, ) - code_bucket = proto.Field( + code_bucket: str = proto.Field( proto.STRING, number=8, ) - default_cookie_expiration = proto.Field( + default_cookie_expiration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=9, message=duration_pb2.Duration, ) - serving_status = proto.Field( + serving_status: ServingStatus = proto.Field( proto.ENUM, number=10, enum=ServingStatus, ) - default_hostname = proto.Field( + default_hostname: str = proto.Field( proto.STRING, number=11, ) - default_bucket = proto.Field( + default_bucket: str = proto.Field( proto.STRING, number=12, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=13, ) - iap = proto.Field( + iap: IdentityAwareProxy = proto.Field( proto.MESSAGE, number=14, message=IdentityAwareProxy, ) - gcr_domain = proto.Field( + gcr_domain: str = proto.Field( proto.STRING, number=16, ) - database_type = proto.Field( + database_type: DatabaseType = proto.Field( proto.ENUM, number=17, enum=DatabaseType, ) - feature_settings = proto.Field( + feature_settings: FeatureSettings = proto.Field( proto.MESSAGE, number=18, message=FeatureSettings, @@ -276,15 +278,15 @@ class UrlDispatchRule(proto.Message): Example: ``default``. """ - domain = proto.Field( + domain: str = proto.Field( proto.STRING, number=1, ) - path = proto.Field( + path: str = proto.Field( proto.STRING, number=2, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=3, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/audit_data.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/audit_data.py index 5de1cad9a24c..06c4a06bd957 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/audit_data.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/audit_data.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore from google.cloud.appengine_admin_v1.types import appengine @@ -50,13 +52,13 @@ class AuditData(proto.Message): This field is a member of `oneof`_ ``method``. """ - update_service = proto.Field( + update_service: "UpdateServiceMethod" = proto.Field( proto.MESSAGE, number=1, oneof="method", message="UpdateServiceMethod", ) - create_version = proto.Field( + create_version: "CreateVersionMethod" = proto.Field( proto.MESSAGE, number=2, oneof="method", @@ -72,7 +74,7 @@ class UpdateServiceMethod(proto.Message): Update service request. """ - request = proto.Field( + request: appengine.UpdateServiceRequest = proto.Field( proto.MESSAGE, number=1, message=appengine.UpdateServiceRequest, @@ -87,7 +89,7 @@ class CreateVersionMethod(proto.Message): Create version request. """ - request = proto.Field( + request: appengine.CreateVersionRequest = proto.Field( proto.MESSAGE, number=1, message=appengine.CreateVersionRequest, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/certificate.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/certificate.py index 8466750aa9a6..0fe3c65d43c4 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/certificate.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/certificate.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -60,7 +62,7 @@ class AuthorizedCertificate(proto.Message): display_name (str): The user-specified display name of the certificate. This is not guaranteed to be unique. Example: ``My Certificate``. - domain_names (Sequence[str]): + domain_names (MutableSequence[str]): Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: ``example.com``. @@ -85,7 +87,7 @@ class AuthorizedCertificate(proto.Message): manually administered by the user, this field will be empty. @OutputOnly - visible_domain_mappings (Sequence[str]): + visible_domain_mappings (MutableSequence[str]): The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: ``apps/myapp/domainMappings/example.com``. @@ -112,42 +114,42 @@ class AuthorizedCertificate(proto.Message): @OutputOnly """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=3, ) - domain_names = proto.RepeatedField( + domain_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=4, ) - expire_time = proto.Field( + expire_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp, ) - certificate_raw_data = proto.Field( + certificate_raw_data: "CertificateRawData" = proto.Field( proto.MESSAGE, number=6, message="CertificateRawData", ) - managed_certificate = proto.Field( + managed_certificate: "ManagedCertificate" = proto.Field( proto.MESSAGE, number=7, message="ManagedCertificate", ) - visible_domain_mappings = proto.RepeatedField( + visible_domain_mappings: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=8, ) - domain_mappings_count = proto.Field( + domain_mappings_count: int = proto.Field( proto.INT32, number=9, ) @@ -186,11 +188,11 @@ class CertificateRawData(proto.Message): @InputOnly """ - public_certificate = proto.Field( + public_certificate: str = proto.Field( proto.STRING, number=1, ) - private_key = proto.Field( + private_key: str = proto.Field( proto.STRING, number=2, ) @@ -214,12 +216,12 @@ class ManagedCertificate(proto.Message): @OutputOnly """ - last_renewal_time = proto.Field( + last_renewal_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - status = proto.Field( + status: "ManagementStatus" = proto.Field( proto.ENUM, number=2, enum="ManagementStatus", diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/deploy.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/deploy.py index 4f48d4ccdd03..c17f74cd4641 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/deploy.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/deploy.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore import proto # type: ignore @@ -33,7 +35,7 @@ class Deployment(proto.Message): App Engine. Attributes: - files (Mapping[str, google.cloud.appengine_admin_v1.types.FileInfo]): + files (MutableMapping[str, google.cloud.appengine_admin_v1.types.FileInfo]): Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the @@ -54,23 +56,23 @@ class Deployment(proto.Message): Engine flexible environment using files or zip. """ - files = proto.MapField( + files: MutableMapping[str, "FileInfo"] = proto.MapField( proto.STRING, proto.MESSAGE, number=1, message="FileInfo", ) - container = proto.Field( + container: "ContainerInfo" = proto.Field( proto.MESSAGE, number=2, message="ContainerInfo", ) - zip_ = proto.Field( + zip_: "ZipInfo" = proto.Field( proto.MESSAGE, number=3, message="ZipInfo", ) - cloud_build_options = proto.Field( + cloud_build_options: "CloudBuildOptions" = proto.Field( proto.MESSAGE, number=6, message="CloudBuildOptions", @@ -95,15 +97,15 @@ class FileInfo(proto.Message): Defaults to the value from Google Cloud Storage. """ - source_url = proto.Field( + source_url: str = proto.Field( proto.STRING, number=1, ) - sha1_sum = proto.Field( + sha1_sum: str = proto.Field( proto.STRING, number=2, ) - mime_type = proto.Field( + mime_type: str = proto.Field( proto.STRING, number=3, ) @@ -123,7 +125,7 @@ class ContainerInfo(proto.Message): "gcr.io/my-project/image@digest". """ - image = proto.Field( + image: str = proto.Field( proto.STRING, number=1, ) @@ -149,11 +151,11 @@ class CloudBuildOptions(proto.Message): Defaults to 10 minutes. """ - app_yaml_path = proto.Field( + app_yaml_path: str = proto.Field( proto.STRING, number=1, ) - cloud_build_timeout = proto.Field( + cloud_build_timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=2, message=duration_pb2.Duration, @@ -177,11 +179,11 @@ class ZipInfo(proto.Message): provided, deployment may be slow. """ - source_url = proto.Field( + source_url: str = proto.Field( proto.STRING, number=3, ) - files_count = proto.Field( + files_count: int = proto.Field( proto.INT32, number=4, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain.py index 52175828c343..668a5dc7c038 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore __protobuf__ = proto.module( @@ -39,11 +41,11 @@ class AuthorizedDomain(proto.Message): use. Example: ``example.com``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain_mapping.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain_mapping.py index 1a0227b05262..7d75e5b475e9 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain_mapping.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/domain_mapping.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore __protobuf__ = proto.module( @@ -41,7 +43,7 @@ class DomainMapping(proto.Message): SSL configuration for this domain. If unconfigured, this domain will not serve with SSL. - resource_records (Sequence[google.cloud.appengine_admin_v1.types.ResourceRecord]): + resource_records (MutableSequence[google.cloud.appengine_admin_v1.types.ResourceRecord]): The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to @@ -49,20 +51,20 @@ class DomainMapping(proto.Message): @OutputOnly """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - ssl_settings = proto.Field( + ssl_settings: "SslSettings" = proto.Field( proto.MESSAGE, number=3, message="SslSettings", ) - resource_records = proto.RepeatedField( + resource_records: MutableSequence["ResourceRecord"] = proto.RepeatedField( proto.MESSAGE, number=4, message="ResourceRecord", @@ -110,16 +112,16 @@ class SslManagementType(proto.Enum): AUTOMATIC = 1 MANUAL = 2 - certificate_id = proto.Field( + certificate_id: str = proto.Field( proto.STRING, number=1, ) - ssl_management_type = proto.Field( + ssl_management_type: SslManagementType = proto.Field( proto.ENUM, number=3, enum=SslManagementType, ) - pending_managed_certificate_id = proto.Field( + pending_managed_certificate_id: str = proto.Field( proto.STRING, number=4, ) @@ -147,15 +149,15 @@ class RecordType(proto.Enum): AAAA = 2 CNAME = 3 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - rrdata = proto.Field( + rrdata: str = proto.Field( proto.STRING, number=2, ) - type_ = proto.Field( + type_: RecordType = proto.Field( proto.ENUM, number=3, enum=RecordType, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/firewall.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/firewall.py index bfca05e92b7b..9062b66f338e 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/firewall.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/firewall.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore __protobuf__ = proto.module( @@ -64,20 +66,20 @@ class Action(proto.Enum): ALLOW = 1 DENY = 2 - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=1, ) - action = proto.Field( + action: Action = proto.Field( proto.ENUM, number=2, enum=Action, ) - source_range = proto.Field( + source_range: str = proto.Field( proto.STRING, number=3, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=4, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/instance.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/instance.py index 48479fcf1353..a767775ae05b 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/instance.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/instance.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -107,73 +109,73 @@ class LivenessState(proto.Enum): DRAINING = 4 TIMEOUT = 5 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - app_engine_release = proto.Field( + app_engine_release: str = proto.Field( proto.STRING, number=3, ) - availability = proto.Field( + availability: Availability = proto.Field( proto.ENUM, number=4, enum=Availability, ) - vm_name = proto.Field( + vm_name: str = proto.Field( proto.STRING, number=5, ) - vm_zone_name = proto.Field( + vm_zone_name: str = proto.Field( proto.STRING, number=6, ) - vm_id = proto.Field( + vm_id: str = proto.Field( proto.STRING, number=7, ) - start_time = proto.Field( + start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp, ) - requests = proto.Field( + requests: int = proto.Field( proto.INT32, number=9, ) - errors = proto.Field( + errors: int = proto.Field( proto.INT32, number=10, ) - qps = proto.Field( + qps: float = proto.Field( proto.FLOAT, number=11, ) - average_latency = proto.Field( + average_latency: int = proto.Field( proto.INT32, number=12, ) - memory_usage = proto.Field( + memory_usage: int = proto.Field( proto.INT64, number=13, ) - vm_status = proto.Field( + vm_status: str = proto.Field( proto.STRING, number=14, ) - vm_debug_enabled = proto.Field( + vm_debug_enabled: bool = proto.Field( proto.BOOL, number=15, ) - vm_ip = proto.Field( + vm_ip: str = proto.Field( proto.STRING, number=16, ) - vm_liveness = proto.Field( + vm_liveness: Liveness.LivenessState = proto.Field( proto.ENUM, number=17, enum=Liveness.LivenessState, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/location.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/location.py index d38b3014771b..ad3c5e227d73 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/location.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/location.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore __protobuf__ = proto.module( @@ -42,15 +44,15 @@ class LocationMetadata(proto.Message): is available in the given location. """ - standard_environment_available = proto.Field( + standard_environment_available: bool = proto.Field( proto.BOOL, number=2, ) - flexible_environment_available = proto.Field( + flexible_environment_available: bool = proto.Field( proto.BOOL, number=4, ) - search_api_available = proto.Field( + search_api_available: bool = proto.Field( proto.BOOL, number=6, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/network_settings.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/network_settings.py index 4a27b4dc2017..3594eb4bfcb8 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/network_settings.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/network_settings.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore __protobuf__ = proto.module( @@ -39,7 +41,7 @@ class IngressTrafficAllowed(proto.Enum): INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY = 2 INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB = 3 - ingress_traffic_allowed = proto.Field( + ingress_traffic_allowed: IngressTrafficAllowed = proto.Field( proto.ENUM, number=1, enum=IngressTrafficAllowed, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/operation.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/operation.py index 6510e7738ecb..9a9a712f9d18 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/operation.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/operation.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -55,7 +57,7 @@ class OperationMetadataV1(proto.Message): ephemeral_message (str): Ephemeral message that may change every time the operation is polled. @OutputOnly - warning (Sequence[str]): + warning (MutableSequence[str]): Durable messages that persist on every operation poll. @OutputOnly create_version_metadata (google.cloud.appengine_admin_v1.types.CreateVersionMetadataV1): @@ -63,37 +65,37 @@ class OperationMetadataV1(proto.Message): This field is a member of `oneof`_ ``method_metadata``. """ - method = proto.Field( + method: str = proto.Field( proto.STRING, number=1, ) - insert_time = proto.Field( + insert_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp, ) - user = proto.Field( + user: str = proto.Field( proto.STRING, number=4, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=5, ) - ephemeral_message = proto.Field( + ephemeral_message: str = proto.Field( proto.STRING, number=6, ) - warning = proto.RepeatedField( + warning: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=7, ) - create_version_metadata = proto.Field( + create_version_metadata: "CreateVersionMetadataV1" = proto.Field( proto.MESSAGE, number=8, oneof="method_metadata", @@ -113,7 +115,7 @@ class CreateVersionMetadataV1(proto.Message): of the version create. @OutputOnly """ - cloud_build_id = proto.Field( + cloud_build_id: str = proto.Field( proto.STRING, number=1, ) diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/service.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/service.py index 86d8437c2994..e09e6285230d 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/service.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + import proto # type: ignore from google.cloud.appengine_admin_v1.types import ( @@ -53,7 +55,7 @@ class Service(proto.Message): Mapping that defines fractional HTTP traffic diversion to different versions within the service. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it @@ -76,25 +78,25 @@ class Service(proto.Message): to all versions. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - split = proto.Field( + split: "TrafficSplit" = proto.Field( proto.MESSAGE, number=3, message="TrafficSplit", ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=4, ) - network_settings = proto.Field( + network_settings: ga_network_settings.NetworkSettings = proto.Field( proto.MESSAGE, number=6, message=ga_network_settings.NetworkSettings, @@ -112,7 +114,7 @@ class TrafficSplit(proto.Message): request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed. - allocations (Mapping[str, float]): + allocations (MutableMapping[str, float]): Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the @@ -131,12 +133,12 @@ class ShardBy(proto.Enum): IP = 2 RANDOM = 3 - shard_by = proto.Field( + shard_by: ShardBy = proto.Field( proto.ENUM, number=1, enum=ShardBy, ) - allocations = proto.MapField( + allocations: MutableMapping[str, float] = proto.MapField( proto.STRING, proto.DOUBLE, number=2, diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/version.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/version.py index fe48d5e5110f..62361bc70d18 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/version.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/types/version.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from typing import MutableMapping, MutableSequence + from google.protobuf import duration_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore @@ -109,7 +111,7 @@ class Version(proto.Message): sometimes referred to as "backends". This field is a member of `oneof`_ ``scaling``. - inbound_services (Sequence[google.cloud.appengine_admin_v1.types.InboundServiceType]): + inbound_services (MutableSequence[google.cloud.appengine_admin_v1.types.InboundServiceType]): Before an application can receive email or XMPP messages, the application must be configured to enable the service. @@ -127,7 +129,7 @@ class Version(proto.Message): Extra network settings. Only applicable in the App Engine flexible environment. - zones (Sequence[str]): + zones (MutableSequence[str]): The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated. @@ -149,7 +151,7 @@ class Version(proto.Message): app_engine_apis (bool): Allows App Engine second generation runtimes to access the legacy bundled services. - beta_settings (Mapping[str, str]): + beta_settings (MutableMapping[str, str]): Metadata settings that are supplied to this version to enable beta runtime features. env (str): @@ -189,17 +191,17 @@ class Version(proto.Message): Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag. - handlers (Sequence[google.cloud.appengine_admin_v1.types.UrlMap]): + handlers (MutableSequence[google.cloud.appengine_admin_v1.types.UrlMap]): An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted. Only returned in ``GET`` requests if ``view=FULL`` is set. - error_handlers (Sequence[google.cloud.appengine_admin_v1.types.ErrorHandler]): + error_handlers (MutableSequence[google.cloud.appengine_admin_v1.types.ErrorHandler]): Custom static error pages. Limited to 10KB per page. Only returned in ``GET`` requests if ``view=FULL`` is set. - libraries (Sequence[google.cloud.appengine_admin_v1.types.Library]): + libraries (MutableSequence[google.cloud.appengine_admin_v1.types.Library]): Configuration for third-party Python runtime libraries that are required by the application. @@ -209,11 +211,11 @@ class Version(proto.Message): Endpoints `__. Only returned in ``GET`` requests if ``view=FULL`` is set. - env_variables (Mapping[str, str]): + env_variables (MutableMapping[str, str]): Environment variables available to the application. Only returned in ``GET`` requests if ``view=FULL`` is set. - build_env_variables (Mapping[str, str]): + build_env_variables (MutableMapping[str, str]): Environment variables available to the build environment. Only returned in ``GET`` requests if ``view=FULL`` is set. @@ -266,188 +268,188 @@ class Version(proto.Message): Enables VPC connectivity for standard apps. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=2, ) - automatic_scaling = proto.Field( + automatic_scaling: "AutomaticScaling" = proto.Field( proto.MESSAGE, number=3, oneof="scaling", message="AutomaticScaling", ) - basic_scaling = proto.Field( + basic_scaling: "BasicScaling" = proto.Field( proto.MESSAGE, number=4, oneof="scaling", message="BasicScaling", ) - manual_scaling = proto.Field( + manual_scaling: "ManualScaling" = proto.Field( proto.MESSAGE, number=5, oneof="scaling", message="ManualScaling", ) - inbound_services = proto.RepeatedField( + inbound_services: MutableSequence["InboundServiceType"] = proto.RepeatedField( proto.ENUM, number=6, enum="InboundServiceType", ) - instance_class = proto.Field( + instance_class: str = proto.Field( proto.STRING, number=7, ) - network = proto.Field( + network: "Network" = proto.Field( proto.MESSAGE, number=8, message="Network", ) - zones = proto.RepeatedField( + zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=118, ) - resources = proto.Field( + resources: "Resources" = proto.Field( proto.MESSAGE, number=9, message="Resources", ) - runtime = proto.Field( + runtime: str = proto.Field( proto.STRING, number=10, ) - runtime_channel = proto.Field( + runtime_channel: str = proto.Field( proto.STRING, number=117, ) - threadsafe = proto.Field( + threadsafe: bool = proto.Field( proto.BOOL, number=11, ) - vm = proto.Field( + vm: bool = proto.Field( proto.BOOL, number=12, ) - app_engine_apis = proto.Field( + app_engine_apis: bool = proto.Field( proto.BOOL, number=128, ) - beta_settings = proto.MapField( + beta_settings: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=13, ) - env = proto.Field( + env: str = proto.Field( proto.STRING, number=14, ) - serving_status = proto.Field( + serving_status: "ServingStatus" = proto.Field( proto.ENUM, number=15, enum="ServingStatus", ) - created_by = proto.Field( + created_by: str = proto.Field( proto.STRING, number=16, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=17, message=timestamp_pb2.Timestamp, ) - disk_usage_bytes = proto.Field( + disk_usage_bytes: int = proto.Field( proto.INT64, number=18, ) - runtime_api_version = proto.Field( + runtime_api_version: str = proto.Field( proto.STRING, number=21, ) - runtime_main_executable_path = proto.Field( + runtime_main_executable_path: str = proto.Field( proto.STRING, number=22, ) - service_account = proto.Field( + service_account: str = proto.Field( proto.STRING, number=127, ) - handlers = proto.RepeatedField( + handlers: MutableSequence[app_yaml.UrlMap] = proto.RepeatedField( proto.MESSAGE, number=100, message=app_yaml.UrlMap, ) - error_handlers = proto.RepeatedField( + error_handlers: MutableSequence[app_yaml.ErrorHandler] = proto.RepeatedField( proto.MESSAGE, number=101, message=app_yaml.ErrorHandler, ) - libraries = proto.RepeatedField( + libraries: MutableSequence[app_yaml.Library] = proto.RepeatedField( proto.MESSAGE, number=102, message=app_yaml.Library, ) - api_config = proto.Field( + api_config: app_yaml.ApiConfigHandler = proto.Field( proto.MESSAGE, number=103, message=app_yaml.ApiConfigHandler, ) - env_variables = proto.MapField( + env_variables: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=104, ) - build_env_variables = proto.MapField( + build_env_variables: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=125, ) - default_expiration = proto.Field( + default_expiration: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=105, message=duration_pb2.Duration, ) - health_check = proto.Field( + health_check: app_yaml.HealthCheck = proto.Field( proto.MESSAGE, number=106, message=app_yaml.HealthCheck, ) - readiness_check = proto.Field( + readiness_check: app_yaml.ReadinessCheck = proto.Field( proto.MESSAGE, number=112, message=app_yaml.ReadinessCheck, ) - liveness_check = proto.Field( + liveness_check: app_yaml.LivenessCheck = proto.Field( proto.MESSAGE, number=113, message=app_yaml.LivenessCheck, ) - nobuild_files_regex = proto.Field( + nobuild_files_regex: str = proto.Field( proto.STRING, number=107, ) - deployment = proto.Field( + deployment: deploy.Deployment = proto.Field( proto.MESSAGE, number=108, message=deploy.Deployment, ) - version_url = proto.Field( + version_url: str = proto.Field( proto.STRING, number=109, ) - endpoints_api_service = proto.Field( + endpoints_api_service: "EndpointsApiService" = proto.Field( proto.MESSAGE, number=110, message="EndpointsApiService", ) - entrypoint = proto.Field( + entrypoint: "Entrypoint" = proto.Field( proto.MESSAGE, number=122, message="Entrypoint", ) - vpc_access_connector = proto.Field( + vpc_access_connector: "VpcAccessConnector" = proto.Field( proto.MESSAGE, number=121, message="VpcAccessConnector", @@ -500,20 +502,20 @@ class RolloutStrategy(proto.Enum): FIXED = 1 MANAGED = 2 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - config_id = proto.Field( + config_id: str = proto.Field( proto.STRING, number=2, ) - rollout_strategy = proto.Field( + rollout_strategy: RolloutStrategy = proto.Field( proto.ENUM, number=3, enum=RolloutStrategy, ) - disable_trace_sampling = proto.Field( + disable_trace_sampling: bool = proto.Field( proto.BOOL, number=4, ) @@ -570,62 +572,62 @@ class AutomaticScaling(proto.Message): Scheduler settings for standard environment. """ - cool_down_period = proto.Field( + cool_down_period: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=1, message=duration_pb2.Duration, ) - cpu_utilization = proto.Field( + cpu_utilization: "CpuUtilization" = proto.Field( proto.MESSAGE, number=2, message="CpuUtilization", ) - max_concurrent_requests = proto.Field( + max_concurrent_requests: int = proto.Field( proto.INT32, number=3, ) - max_idle_instances = proto.Field( + max_idle_instances: int = proto.Field( proto.INT32, number=4, ) - max_total_instances = proto.Field( + max_total_instances: int = proto.Field( proto.INT32, number=5, ) - max_pending_latency = proto.Field( + max_pending_latency: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=6, message=duration_pb2.Duration, ) - min_idle_instances = proto.Field( + min_idle_instances: int = proto.Field( proto.INT32, number=7, ) - min_total_instances = proto.Field( + min_total_instances: int = proto.Field( proto.INT32, number=8, ) - min_pending_latency = proto.Field( + min_pending_latency: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=9, message=duration_pb2.Duration, ) - request_utilization = proto.Field( + request_utilization: "RequestUtilization" = proto.Field( proto.MESSAGE, number=10, message="RequestUtilization", ) - disk_utilization = proto.Field( + disk_utilization: "DiskUtilization" = proto.Field( proto.MESSAGE, number=11, message="DiskUtilization", ) - network_utilization = proto.Field( + network_utilization: "NetworkUtilization" = proto.Field( proto.MESSAGE, number=12, message="NetworkUtilization", ) - standard_scheduler_settings = proto.Field( + standard_scheduler_settings: "StandardSchedulerSettings" = proto.Field( proto.MESSAGE, number=20, message="StandardSchedulerSettings", @@ -648,12 +650,12 @@ class BasicScaling(proto.Message): this version. """ - idle_timeout = proto.Field( + idle_timeout: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=1, message=duration_pb2.Duration, ) - max_instances = proto.Field( + max_instances: int = proto.Field( proto.INT32, number=2, ) @@ -672,7 +674,7 @@ class ManualScaling(proto.Message): ``set_num_instances()`` function. """ - instances = proto.Field( + instances: int = proto.Field( proto.INT32, number=1, ) @@ -690,12 +692,12 @@ class CpuUtilization(proto.Message): scaling. Must be between 0 and 1. """ - aggregation_window_length = proto.Field( + aggregation_window_length: duration_pb2.Duration = proto.Field( proto.MESSAGE, number=1, message=duration_pb2.Duration, ) - target_utilization = proto.Field( + target_utilization: float = proto.Field( proto.DOUBLE, number=2, ) @@ -712,11 +714,11 @@ class RequestUtilization(proto.Message): Target number of concurrent requests. """ - target_request_count_per_second = proto.Field( + target_request_count_per_second: int = proto.Field( proto.INT32, number=1, ) - target_concurrent_requests = proto.Field( + target_concurrent_requests: int = proto.Field( proto.INT32, number=2, ) @@ -737,19 +739,19 @@ class DiskUtilization(proto.Message): Target ops read per seconds. """ - target_write_bytes_per_second = proto.Field( + target_write_bytes_per_second: int = proto.Field( proto.INT32, number=14, ) - target_write_ops_per_second = proto.Field( + target_write_ops_per_second: int = proto.Field( proto.INT32, number=15, ) - target_read_bytes_per_second = proto.Field( + target_read_bytes_per_second: int = proto.Field( proto.INT32, number=16, ) - target_read_ops_per_second = proto.Field( + target_read_ops_per_second: int = proto.Field( proto.INT32, number=17, ) @@ -770,19 +772,19 @@ class NetworkUtilization(proto.Message): Target packets received per second. """ - target_sent_bytes_per_second = proto.Field( + target_sent_bytes_per_second: int = proto.Field( proto.INT32, number=1, ) - target_sent_packets_per_second = proto.Field( + target_sent_packets_per_second: int = proto.Field( proto.INT32, number=11, ) - target_received_bytes_per_second = proto.Field( + target_received_bytes_per_second: int = proto.Field( proto.INT32, number=12, ) - target_received_packets_per_second = proto.Field( + target_received_packets_per_second: int = proto.Field( proto.INT32, number=13, ) @@ -806,19 +808,19 @@ class StandardSchedulerSettings(proto.Message): zero to disable ``max_instances`` configuration. """ - target_cpu_utilization = proto.Field( + target_cpu_utilization: float = proto.Field( proto.DOUBLE, number=1, ) - target_throughput_utilization = proto.Field( + target_throughput_utilization: float = proto.Field( proto.DOUBLE, number=2, ) - min_instances = proto.Field( + min_instances: int = proto.Field( proto.INT32, number=3, ) - max_instances = proto.Field( + max_instances: int = proto.Field( proto.INT32, number=4, ) @@ -829,7 +831,7 @@ class Network(proto.Message): Only applicable in the App Engine flexible environment. Attributes: - forwarded_ports (Sequence[str]): + forwarded_ports (MutableSequence[str]): List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable in the App Engine @@ -871,23 +873,23 @@ class Network(proto.Message): environment. """ - forwarded_ports = proto.RepeatedField( + forwarded_ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) - instance_tag = proto.Field( + instance_tag: str = proto.Field( proto.STRING, number=2, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3, ) - subnetwork_name = proto.Field( + subnetwork_name: str = proto.Field( proto.STRING, number=4, ) - session_affinity = proto.Field( + session_affinity: bool = proto.Field( proto.BOOL, number=5, ) @@ -906,15 +908,15 @@ class Volume(proto.Message): Volume size in gigabytes. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - volume_type = proto.Field( + volume_type: str = proto.Field( proto.STRING, number=2, ) - size_gb = proto.Field( + size_gb: float = proto.Field( proto.DOUBLE, number=3, ) @@ -930,7 +932,7 @@ class Resources(proto.Message): Disk size (GB) needed. memory_gb (float): Memory (GB) needed. - volumes (Sequence[google.cloud.appengine_admin_v1.types.Volume]): + volumes (MutableSequence[google.cloud.appengine_admin_v1.types.Volume]): User specified volumes. kms_key_reference (str): The name of the encryption key that is stored @@ -938,24 +940,24 @@ class Resources(proto.Message): Cloud Composer to encrypt the vm disk """ - cpu = proto.Field( + cpu: float = proto.Field( proto.DOUBLE, number=1, ) - disk_gb = proto.Field( + disk_gb: float = proto.Field( proto.DOUBLE, number=2, ) - memory_gb = proto.Field( + memory_gb: float = proto.Field( proto.DOUBLE, number=3, ) - volumes = proto.RepeatedField( + volumes: MutableSequence["Volume"] = proto.RepeatedField( proto.MESSAGE, number=4, message="Volume", ) - kms_key_reference = proto.Field( + kms_key_reference: str = proto.Field( proto.STRING, number=5, ) @@ -984,11 +986,11 @@ class EgressSetting(proto.Enum): ALL_TRAFFIC = 1 PRIVATE_IP_RANGES = 2 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - egress_setting = proto.Field( + egress_setting: EgressSetting = proto.Field( proto.ENUM, number=2, enum=EgressSetting, @@ -1008,7 +1010,7 @@ class Entrypoint(proto.Message): This field is a member of `oneof`_ ``command``. """ - shell = proto.Field( + shell: str = proto.Field( proto.STRING, number=1, oneof="command", diff --git a/packages/google-cloud-appengine-admin/release-please-config.json b/packages/google-cloud-appengine-admin/release-please-config.json index fcf159eb55c1..e1ecbdd891a4 100644 --- a/packages/google-cloud-appengine-admin/release-please-config.json +++ b/packages/google-cloud-appengine-admin/release-please-config.json @@ -4,7 +4,12 @@ ".": { "release-type": "python", "extra-files": [ - "google/cloud/appengine_admin/gapic_version.py" + "google/cloud/appengine_admin/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.appengine.v1.json", + "jsonpath": "$.clientLibrary.version" + } ] } }, diff --git a/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_appengine admin_v1.json b/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json similarity index 99% rename from packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_appengine admin_v1.json rename to packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json index 91148e691743..fb8cbf58355c 100644 --- a/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_appengine admin_v1.json +++ b/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-appengine-admin" + "name": "google-cloud-appengine-admin", + "version": "0.1.0" }, "snippets": [ {