diff --git a/.github/release-please.yml b/.github/release-please.yml index 466597e..528b274 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,3 @@ releaseType: python handleGHRelease: true +manifest: true diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..ca1c614 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.7.2" +} diff --git a/docs/bigquery_migration_v2/types.rst b/docs/bigquery_migration_v2/types.rst index a632ea8..60d74a5 100644 --- a/docs/bigquery_migration_v2/types.rst +++ b/docs/bigquery_migration_v2/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Bigquery Migration v2 API .. automodule:: google.cloud.bigquery_migration_v2.types :members: - :undoc-members: :show-inheritance: diff --git a/docs/bigquery_migration_v2alpha/types.rst b/docs/bigquery_migration_v2alpha/types.rst index 3024de8..0260c71 100644 --- a/docs/bigquery_migration_v2alpha/types.rst +++ b/docs/bigquery_migration_v2alpha/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Bigquery Migration v2alpha API .. automodule:: google.cloud.bigquery_migration_v2alpha.types :members: - :undoc-members: :show-inheritance: diff --git a/google/cloud/bigquery_migration/__init__.py b/google/cloud/bigquery_migration/__init__.py index 861cad9..fcedde9 100644 --- a/google/cloud/bigquery_migration/__init__.py +++ b/google/cloud/bigquery_migration/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.bigquery_migration import gapic_version as package_version + +__version__ = package_version.__version__ + from google.cloud.bigquery_migration_v2.services.migration_service.async_client import ( MigrationServiceAsyncClient, diff --git a/google/cloud/bigquery_migration/gapic_version.py b/google/cloud/bigquery_migration/gapic_version.py new file mode 100644 index 0000000..84acd57 --- /dev/null +++ b/google/cloud/bigquery_migration/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.7.2" # {x-release-please-version} diff --git a/google/cloud/bigquery_migration_v2/__init__.py b/google/cloud/bigquery_migration_v2/__init__.py index d99dbca..e9496c7 100644 --- a/google/cloud/bigquery_migration_v2/__init__.py +++ b/google/cloud/bigquery_migration_v2/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.bigquery_migration import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.migration_service import ( MigrationServiceAsyncClient, diff --git a/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py b/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py index 668d674..7bcbf19 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/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 @@ -175,9 +185,9 @@ def transport(self) -> MigrationServiceTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, MigrationServiceTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the migration service client. @@ -221,12 +231,14 @@ def __init__( async def create_migration_workflow( self, - request: Union[migration_service.CreateMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.CreateMigrationWorkflowRequest, dict] + ] = None, *, - parent: str = None, - migration_workflow: migration_entities.MigrationWorkflow = None, + parent: Optional[str] = None, + migration_workflow: Optional[migration_entities.MigrationWorkflow] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> migration_entities.MigrationWorkflow: r"""Creates a migration workflow. @@ -258,7 +270,7 @@ async def sample_create_migration_workflow(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2.types.CreateMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.CreateMigrationWorkflowRequest, dict]]): The request object. Request to create a migration workflow resource. parent (:class:`str`): @@ -335,11 +347,13 @@ async def sample_create_migration_workflow(): async def get_migration_workflow( self, - request: Union[migration_service.GetMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationWorkflowRequest, 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]] = (), ) -> migration_entities.MigrationWorkflow: r"""Gets a previously created migration workflow. @@ -371,7 +385,7 @@ async def sample_get_migration_workflow(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2.types.GetMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.GetMigrationWorkflowRequest, dict]]): The request object. A request to get a previously created migration workflow. name (:class:`str`): @@ -448,11 +462,13 @@ async def sample_get_migration_workflow(): async def list_migration_workflows( self, - request: Union[migration_service.ListMigrationWorkflowsRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationWorkflowsRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationWorkflowsAsyncPager: r"""Lists previously created migration workflow. @@ -485,7 +501,7 @@ async def sample_list_migration_workflows(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2.types.ListMigrationWorkflowsRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.ListMigrationWorkflowsRequest, dict]]): The request object. A request to list previously created migration workflows. parent (:class:`str`): @@ -572,11 +588,13 @@ async def sample_list_migration_workflows(): async def delete_migration_workflow( self, - request: Union[migration_service.DeleteMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.DeleteMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Deletes a migration workflow by name. @@ -605,7 +623,7 @@ async def sample_delete_migration_workflow(): await client.delete_migration_workflow(request=request) Args: - request (Union[google.cloud.bigquery_migration_v2.types.DeleteMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.DeleteMigrationWorkflowRequest, dict]]): The request object. A request to delete a previously created migration workflow. name (:class:`str`): @@ -663,11 +681,13 @@ async def sample_delete_migration_workflow(): async def start_migration_workflow( self, - request: Union[migration_service.StartMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.StartMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Starts a previously created migration workflow. I.e., @@ -700,7 +720,7 @@ async def sample_start_migration_workflow(): await client.start_migration_workflow(request=request) Args: - request (Union[google.cloud.bigquery_migration_v2.types.StartMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.StartMigrationWorkflowRequest, dict]]): The request object. A request to start a previously created migration workflow. name (:class:`str`): @@ -767,11 +787,13 @@ async def sample_start_migration_workflow(): async def get_migration_subtask( self, - request: Union[migration_service.GetMigrationSubtaskRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationSubtaskRequest, 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]] = (), ) -> migration_entities.MigrationSubtask: r"""Gets a previously created migration subtask. @@ -803,7 +825,7 @@ async def sample_get_migration_subtask(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2.types.GetMigrationSubtaskRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.GetMigrationSubtaskRequest, dict]]): The request object. A request to get a previously created migration subtasks. name (:class:`str`): @@ -874,11 +896,13 @@ async def sample_get_migration_subtask(): async def list_migration_subtasks( self, - request: Union[migration_service.ListMigrationSubtasksRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationSubtasksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationSubtasksAsyncPager: r"""Lists previously created migration subtasks. @@ -911,7 +935,7 @@ async def sample_list_migration_subtasks(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2.types.ListMigrationSubtasksRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2.types.ListMigrationSubtasksRequest, dict]]): The request object. A request to list previously created migration subtasks. parent (:class:`str`): diff --git a/google/cloud/bigquery_migration_v2/services/migration_service/client.py b/google/cloud/bigquery_migration_v2/services/migration_service/client.py index 12f20c6..0d9dc87 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/client.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +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 @@ -66,7 +77,7 @@ class MigrationServiceClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[MigrationServiceTransport]: """Returns an appropriate transport class. @@ -365,8 +376,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, MigrationServiceTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, MigrationServiceTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the migration service client. @@ -380,7 +391,7 @@ def __init__( transport (Union[str, MigrationServiceTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -410,6 +421,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -462,12 +474,14 @@ def __init__( def create_migration_workflow( self, - request: Union[migration_service.CreateMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.CreateMigrationWorkflowRequest, dict] + ] = None, *, - parent: str = None, - migration_workflow: migration_entities.MigrationWorkflow = None, + parent: Optional[str] = None, + migration_workflow: Optional[migration_entities.MigrationWorkflow] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> migration_entities.MigrationWorkflow: r"""Creates a migration workflow. @@ -578,11 +592,13 @@ def sample_create_migration_workflow(): def get_migration_workflow( self, - request: Union[migration_service.GetMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationWorkflowRequest, 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]] = (), ) -> migration_entities.MigrationWorkflow: r"""Gets a previously created migration workflow. @@ -682,11 +698,13 @@ def sample_get_migration_workflow(): def list_migration_workflows( self, - request: Union[migration_service.ListMigrationWorkflowsRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationWorkflowsRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationWorkflowsPager: r"""Lists previously created migration workflow. @@ -797,11 +815,13 @@ def sample_list_migration_workflows(): def delete_migration_workflow( self, - request: Union[migration_service.DeleteMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.DeleteMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Deletes a migration workflow by name. @@ -890,11 +910,13 @@ def sample_delete_migration_workflow(): def start_migration_workflow( self, - request: Union[migration_service.StartMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.StartMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Starts a previously created migration workflow. I.e., @@ -985,11 +1007,13 @@ def sample_start_migration_workflow(): def get_migration_subtask( self, - request: Union[migration_service.GetMigrationSubtaskRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationSubtaskRequest, 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]] = (), ) -> migration_entities.MigrationSubtask: r"""Gets a previously created migration subtask. @@ -1092,11 +1116,13 @@ def sample_get_migration_subtask(): def list_migration_subtasks( self, - request: Union[migration_service.ListMigrationSubtasksRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationSubtasksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationSubtasksPager: r"""Lists previously created migration subtasks. diff --git a/google/cloud/bigquery_migration_v2/services/migration_service/transports/base.py b/google/cloud/bigquery_migration_v2/services/migration_service/transports/base.py index 5c92cf1..3577709 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/transports/base.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/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/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc.py b/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc.py index 930489f..1f74f1a 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc.py @@ -50,14 +50,14 @@ def __init__( self, *, host: str = "bigquerymigration.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, @@ -184,8 +184,8 @@ def __init__( def create_channel( cls, host: str = "bigquerymigration.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/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc_asyncio.py b/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc_asyncio.py index db6e440..5676922 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/transports/grpc_asyncio.py @@ -52,7 +52,7 @@ class MigrationServiceGrpcAsyncIOTransport(MigrationServiceTransport): def create_channel( cls, host: str = "bigquerymigration.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, @@ -95,15 +95,15 @@ def __init__( self, *, host: str = "bigquerymigration.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/google/cloud/bigquery_migration_v2/types/migration_entities.py b/google/cloud/bigquery_migration_v2/types/migration_entities.py index d7acbeb..f2c8805 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_entities.py +++ b/google/cloud/bigquery_migration_v2/types/migration_entities.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 from google.rpc import error_details_pb2 # type: ignore import proto # type: ignore @@ -47,7 +49,7 @@ class MigrationWorkflow(proto.Message): The display name of the workflow. This can be set to give a workflow a descriptive name. There is no guarantee or enforcement of uniqueness. - tasks (Mapping[str, google.cloud.bigquery_migration_v2.types.MigrationTask]): + tasks (MutableMapping[str, google.cloud.bigquery_migration_v2.types.MigrationTask]): The tasks in a workflow in a named map. The name (i.e. key) has no meaning and is merely a convenient way to address a specific task in a @@ -68,31 +70,31 @@ class State(proto.Enum): PAUSED = 3 COMPLETED = 4 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=6, ) - tasks = proto.MapField( + tasks: MutableMapping[str, "MigrationTask"] = proto.MapField( proto.STRING, proto.MESSAGE, number=2, message="MigrationTask", ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=3, enum=State, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp, @@ -145,36 +147,38 @@ class State(proto.Enum): SUCCEEDED = 5 FAILED = 6 - translation_config_details = proto.Field( - proto.MESSAGE, - number=14, - oneof="task_details", - message=translation_config.TranslationConfigDetails, + translation_config_details: translation_config.TranslationConfigDetails = ( + proto.Field( + proto.MESSAGE, + number=14, + oneof="task_details", + message=translation_config.TranslationConfigDetails, + ) ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=1, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=2, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=4, enum=State, ) - processing_error = proto.Field( + processing_error: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=5, message=error_details_pb2.ErrorInfo, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp, @@ -210,7 +214,7 @@ class MigrationSubtask(proto.Message): processing_error (google.rpc.error_details_pb2.ErrorInfo): Output only. An explanation that may be populated when the task is in FAILED state. - resource_error_details (Sequence[google.cloud.bigquery_migration_v2.types.ResourceErrorDetail]): + resource_error_details (MutableSequence[google.cloud.bigquery_migration_v2.types.ResourceErrorDetail]): Output only. Provides details to errors and issues encountered while processing the subtask. Presence of error details does not mean that the @@ -225,7 +229,7 @@ class MigrationSubtask(proto.Message): Time when the subtask was created. last_update_time (google.protobuf.timestamp_pb2.Timestamp): Time when the subtask was last updated. - metrics (Sequence[google.cloud.bigquery_migration_v2.types.TimeSeries]): + metrics (MutableSequence[google.cloud.bigquery_migration_v2.types.TimeSeries]): The metrics for the subtask. """ @@ -238,48 +242,50 @@ class State(proto.Enum): FAILED = 4 PAUSED = 5 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - task_id = proto.Field( + task_id: str = proto.Field( proto.STRING, number=2, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=5, enum=State, ) - processing_error = proto.Field( + processing_error: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=6, message=error_details_pb2.ErrorInfo, ) - resource_error_details = proto.RepeatedField( + resource_error_details: MutableSequence[ + migration_error_details.ResourceErrorDetail + ] = proto.RepeatedField( proto.MESSAGE, number=12, message=migration_error_details.ResourceErrorDetail, ) - resource_error_count = proto.Field( + resource_error_count: int = proto.Field( proto.INT32, number=13, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp, ) - metrics = proto.RepeatedField( + metrics: MutableSequence[migration_metrics.TimeSeries] = proto.RepeatedField( proto.MESSAGE, number=11, message=migration_metrics.TimeSeries, diff --git a/google/cloud/bigquery_migration_v2/types/migration_error_details.py b/google/cloud/bigquery_migration_v2/types/migration_error_details.py index 3274fd7..fab6bd4 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_error_details.py +++ b/google/cloud/bigquery_migration_v2/types/migration_error_details.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.rpc import error_details_pb2 # type: ignore import proto # type: ignore @@ -33,7 +35,7 @@ class ResourceErrorDetail(proto.Message): resource_info (google.rpc.error_details_pb2.ResourceInfo): Required. Information about the resource where the error is located. - error_details (Sequence[google.cloud.bigquery_migration_v2.types.ErrorDetail]): + error_details (MutableSequence[google.cloud.bigquery_migration_v2.types.ErrorDetail]): Required. The error details for the resource. error_count (int): Required. How many errors there are in total for the @@ -42,17 +44,17 @@ class ResourceErrorDetail(proto.Message): ``error_details``. """ - resource_info = proto.Field( + resource_info: error_details_pb2.ResourceInfo = proto.Field( proto.MESSAGE, number=1, message=error_details_pb2.ResourceInfo, ) - error_details = proto.RepeatedField( + error_details: MutableSequence["ErrorDetail"] = proto.RepeatedField( proto.MESSAGE, number=2, message="ErrorDetail", ) - error_count = proto.Field( + error_count: int = proto.Field( proto.INT32, number=3, ) @@ -71,12 +73,12 @@ class ErrorDetail(proto.Message): with structured detail. """ - location = proto.Field( + location: "ErrorLocation" = proto.Field( proto.MESSAGE, number=1, message="ErrorLocation", ) - error_info = proto.Field( + error_info: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=2, message=error_details_pb2.ErrorInfo, @@ -97,11 +99,11 @@ class ErrorLocation(proto.Message): that there is no columns information. """ - line = proto.Field( + line: int = proto.Field( proto.INT32, number=1, ) - column = proto.Field( + column: int = proto.Field( proto.INT32, number=2, ) diff --git a/google/cloud/bigquery_migration_v2/types/migration_metrics.py b/google/cloud/bigquery_migration_v2/types/migration_metrics.py index e3d0d16..f0ad71e 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_metrics.py +++ b/google/cloud/bigquery_migration_v2/types/migration_metrics.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.api import distribution_pb2 # type: ignore from google.api import metric_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore @@ -47,7 +49,7 @@ class TimeSeries(proto.Message): must be auto-created, then this field specifies the metric kind of the new descriptor and must be either ``GAUGE`` (the default) or ``CUMULATIVE``. - points (Sequence[google.cloud.bigquery_migration_v2.types.Point]): + points (MutableSequence[google.cloud.bigquery_migration_v2.types.Point]): Required. The data points of this time series. When listing time series, points are returned in reverse time order. @@ -59,21 +61,21 @@ class TimeSeries(proto.Message): ``BOOL``, ``INT64``, ``DOUBLE``, or ``DISTRIBUTION``. """ - metric = proto.Field( + metric: str = proto.Field( proto.STRING, number=1, ) - value_type = proto.Field( + value_type: metric_pb2.MetricDescriptor.ValueType = proto.Field( proto.ENUM, number=2, enum=metric_pb2.MetricDescriptor.ValueType, ) - metric_kind = proto.Field( + metric_kind: metric_pb2.MetricDescriptor.MetricKind = proto.Field( proto.ENUM, number=3, enum=metric_pb2.MetricDescriptor.MetricKind, ) - points = proto.RepeatedField( + points: MutableSequence["Point"] = proto.RepeatedField( proto.MESSAGE, number=4, message="Point", @@ -100,12 +102,12 @@ class Point(proto.Message): The value of the data point. """ - interval = proto.Field( + interval: "TimeInterval" = proto.Field( proto.MESSAGE, number=1, message="TimeInterval", ) - value = proto.Field( + value: "TypedValue" = proto.Field( proto.MESSAGE, number=2, message="TypedValue", @@ -127,12 +129,12 @@ class TimeInterval(proto.Message): Required. The end of the time interval. """ - start_time = proto.Field( + start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, @@ -175,27 +177,27 @@ class TypedValue(proto.Message): This field is a member of `oneof`_ ``value``. """ - bool_value = proto.Field( + bool_value: bool = proto.Field( proto.BOOL, number=1, oneof="value", ) - int64_value = proto.Field( + int64_value: int = proto.Field( proto.INT64, number=2, oneof="value", ) - double_value = proto.Field( + double_value: float = proto.Field( proto.DOUBLE, number=3, oneof="value", ) - string_value = proto.Field( + string_value: str = proto.Field( proto.STRING, number=4, oneof="value", ) - distribution_value = proto.Field( + distribution_value: distribution_pb2.Distribution = proto.Field( proto.MESSAGE, number=5, oneof="value", diff --git a/google/cloud/bigquery_migration_v2/types/migration_service.py b/google/cloud/bigquery_migration_v2/types/migration_service.py index 85c9a67..0b38c79 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_service.py +++ b/google/cloud/bigquery_migration_v2/types/migration_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 + from google.protobuf import field_mask_pb2 # type: ignore import proto # type: ignore @@ -45,11 +47,11 @@ class CreateMigrationWorkflowRequest(proto.Message): Required. The migration workflow to create. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - migration_workflow = proto.Field( + migration_workflow: migration_entities.MigrationWorkflow = proto.Field( proto.MESSAGE, number=2, message=migration_entities.MigrationWorkflow, @@ -67,11 +69,11 @@ class GetMigrationWorkflowRequest(proto.Message): The list of fields to be retrieved. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -101,20 +103,20 @@ class ListMigrationWorkflowsRequest(proto.Message): the page token. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, ) - 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, ) @@ -124,7 +126,7 @@ class ListMigrationWorkflowsResponse(proto.Message): r"""Response object for a ``ListMigrationWorkflows`` call. Attributes: - migration_workflows (Sequence[google.cloud.bigquery_migration_v2.types.MigrationWorkflow]): + migration_workflows (MutableSequence[google.cloud.bigquery_migration_v2.types.MigrationWorkflow]): The migration workflows for the specified project / location. next_page_token (str): @@ -137,12 +139,14 @@ class ListMigrationWorkflowsResponse(proto.Message): def raw_page(self): return self - migration_workflows = proto.RepeatedField( + migration_workflows: MutableSequence[ + migration_entities.MigrationWorkflow + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=migration_entities.MigrationWorkflow, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -157,7 +161,7 @@ class DeleteMigrationWorkflowRequest(proto.Message): Example: ``projects/123/locations/us/workflows/1234`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -172,7 +176,7 @@ class StartMigrationWorkflowRequest(proto.Message): Example: ``projects/123/locations/us/workflows/1234`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -190,11 +194,11 @@ class GetMigrationSubtaskRequest(proto.Message): Optional. The list of fields to be retrieved. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -229,24 +233,24 @@ class ListMigrationSubtasksRequest(proto.Message): ID (not the name in the named map). """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, ) - 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, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=5, ) @@ -256,7 +260,7 @@ class ListMigrationSubtasksResponse(proto.Message): r"""Response object for a ``ListMigrationSubtasks`` call. Attributes: - migration_subtasks (Sequence[google.cloud.bigquery_migration_v2.types.MigrationSubtask]): + migration_subtasks (MutableSequence[google.cloud.bigquery_migration_v2.types.MigrationSubtask]): The migration subtasks for the specified task. next_page_token (str): @@ -269,12 +273,14 @@ class ListMigrationSubtasksResponse(proto.Message): def raw_page(self): return self - migration_subtasks = proto.RepeatedField( + migration_subtasks: MutableSequence[ + migration_entities.MigrationSubtask + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=migration_entities.MigrationSubtask, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) diff --git a/google/cloud/bigquery_migration_v2/types/translation_config.py b/google/cloud/bigquery_migration_v2/types/translation_config.py index 71343ef..02f30e6 100644 --- a/google/cloud/bigquery_migration_v2/types/translation_config.py +++ b/google/cloud/bigquery_migration_v2/types/translation_config.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( @@ -76,33 +78,33 @@ class TranslationConfigDetails(proto.Message): translation. """ - gcs_source_path = proto.Field( + gcs_source_path: str = proto.Field( proto.STRING, number=1, oneof="source_location", ) - gcs_target_path = proto.Field( + gcs_target_path: str = proto.Field( proto.STRING, number=2, oneof="target_location", ) - source_dialect = proto.Field( + source_dialect: "Dialect" = proto.Field( proto.MESSAGE, number=3, message="Dialect", ) - target_dialect = proto.Field( + target_dialect: "Dialect" = proto.Field( proto.MESSAGE, number=4, message="Dialect", ) - name_mapping_list = proto.Field( + name_mapping_list: "ObjectNameMappingList" = proto.Field( proto.MESSAGE, number=5, oneof="output_name_mapping", message="ObjectNameMappingList", ) - source_env = proto.Field( + source_env: "SourceEnv" = proto.Field( proto.MESSAGE, number=6, message="SourceEnv", @@ -178,85 +180,85 @@ class Dialect(proto.Message): This field is a member of `oneof`_ ``dialect_value``. """ - bigquery_dialect = proto.Field( + bigquery_dialect: "BigQueryDialect" = proto.Field( proto.MESSAGE, number=1, oneof="dialect_value", message="BigQueryDialect", ) - hiveql_dialect = proto.Field( + hiveql_dialect: "HiveQLDialect" = proto.Field( proto.MESSAGE, number=2, oneof="dialect_value", message="HiveQLDialect", ) - redshift_dialect = proto.Field( + redshift_dialect: "RedshiftDialect" = proto.Field( proto.MESSAGE, number=3, oneof="dialect_value", message="RedshiftDialect", ) - teradata_dialect = proto.Field( + teradata_dialect: "TeradataDialect" = proto.Field( proto.MESSAGE, number=4, oneof="dialect_value", message="TeradataDialect", ) - oracle_dialect = proto.Field( + oracle_dialect: "OracleDialect" = proto.Field( proto.MESSAGE, number=5, oneof="dialect_value", message="OracleDialect", ) - sparksql_dialect = proto.Field( + sparksql_dialect: "SparkSQLDialect" = proto.Field( proto.MESSAGE, number=6, oneof="dialect_value", message="SparkSQLDialect", ) - snowflake_dialect = proto.Field( + snowflake_dialect: "SnowflakeDialect" = proto.Field( proto.MESSAGE, number=7, oneof="dialect_value", message="SnowflakeDialect", ) - netezza_dialect = proto.Field( + netezza_dialect: "NetezzaDialect" = proto.Field( proto.MESSAGE, number=8, oneof="dialect_value", message="NetezzaDialect", ) - azure_synapse_dialect = proto.Field( + azure_synapse_dialect: "AzureSynapseDialect" = proto.Field( proto.MESSAGE, number=9, oneof="dialect_value", message="AzureSynapseDialect", ) - vertica_dialect = proto.Field( + vertica_dialect: "VerticaDialect" = proto.Field( proto.MESSAGE, number=10, oneof="dialect_value", message="VerticaDialect", ) - sql_server_dialect = proto.Field( + sql_server_dialect: "SQLServerDialect" = proto.Field( proto.MESSAGE, number=11, oneof="dialect_value", message="SQLServerDialect", ) - postgresql_dialect = proto.Field( + postgresql_dialect: "PostgresqlDialect" = proto.Field( proto.MESSAGE, number=12, oneof="dialect_value", message="PostgresqlDialect", ) - presto_dialect = proto.Field( + presto_dialect: "PrestoDialect" = proto.Field( proto.MESSAGE, number=13, oneof="dialect_value", message="PrestoDialect", ) - mysql_dialect = proto.Field( + mysql_dialect: "MySQLDialect" = proto.Field( proto.MESSAGE, number=14, oneof="dialect_value", @@ -291,7 +293,7 @@ class Mode(proto.Enum): SQL = 1 BTEQ = 2 - mode = proto.Field( + mode: Mode = proto.Field( proto.ENUM, number=1, enum=Mode, @@ -343,11 +345,11 @@ class ObjectNameMappingList(proto.Message): proto messages of existing name to desired output name. Attributes: - name_map (Sequence[google.cloud.bigquery_migration_v2.types.ObjectNameMapping]): + name_map (MutableSequence[google.cloud.bigquery_migration_v2.types.ObjectNameMapping]): The elements of the object name map. """ - name_map = proto.RepeatedField( + name_map: MutableSequence["ObjectNameMapping"] = proto.RepeatedField( proto.MESSAGE, number=1, message="ObjectNameMapping", @@ -368,12 +370,12 @@ class ObjectNameMapping(proto.Message): being mapped. """ - source = proto.Field( + source: "NameMappingKey" = proto.Field( proto.MESSAGE, number=1, message="NameMappingKey", ) - target = proto.Field( + target: "NameMappingValue" = proto.Field( proto.MESSAGE, number=2, message="NameMappingValue", @@ -412,24 +414,24 @@ class Type(proto.Enum): ATTRIBUTE_ALIAS = 6 FUNCTION = 7 - type_ = proto.Field( + type_: Type = proto.Field( proto.ENUM, number=1, enum=Type, ) - database = proto.Field( + database: str = proto.Field( proto.STRING, number=2, ) - schema = proto.Field( + schema: str = proto.Field( proto.STRING, number=3, ) - relation = proto.Field( + relation: str = proto.Field( proto.STRING, number=4, ) - attribute = proto.Field( + attribute: str = proto.Field( proto.STRING, number=5, ) @@ -454,19 +456,19 @@ class NameMappingValue(proto.Message): equivalent in the target data warehouse). """ - database = proto.Field( + database: str = proto.Field( proto.STRING, number=1, ) - schema = proto.Field( + schema: str = proto.Field( proto.STRING, number=2, ) - relation = proto.Field( + relation: str = proto.Field( proto.STRING, number=3, ) - attribute = proto.Field( + attribute: str = proto.Field( proto.STRING, number=4, ) @@ -480,17 +482,17 @@ class SourceEnv(proto.Message): default_database (str): The default database name to fully qualify SQL objects when their database name is missing. - schema_search_path (Sequence[str]): + schema_search_path (MutableSequence[str]): The schema search path. When SQL objects are missing schema name, translation engine will search through this list to find the value. """ - default_database = proto.Field( + default_database: str = proto.Field( proto.STRING, number=1, ) - schema_search_path = proto.RepeatedField( + schema_search_path: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2, ) diff --git a/google/cloud/bigquery_migration_v2alpha/__init__.py b/google/cloud/bigquery_migration_v2alpha/__init__.py index 2b5588b..46a41b2 100644 --- a/google/cloud/bigquery_migration_v2alpha/__init__.py +++ b/google/cloud/bigquery_migration_v2alpha/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.bigquery_migration import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.migration_service import ( MigrationServiceAsyncClient, diff --git a/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py b/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py index 5a05747..88a4858 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/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 @@ -175,9 +185,9 @@ def transport(self) -> MigrationServiceTransport: def __init__( self, *, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, MigrationServiceTransport] = "grpc_asyncio", - client_options: ClientOptions = None, + client_options: Optional[ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the migration service client. @@ -221,12 +231,14 @@ def __init__( async def create_migration_workflow( self, - request: Union[migration_service.CreateMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.CreateMigrationWorkflowRequest, dict] + ] = None, *, - parent: str = None, - migration_workflow: migration_entities.MigrationWorkflow = None, + parent: Optional[str] = None, + migration_workflow: Optional[migration_entities.MigrationWorkflow] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> migration_entities.MigrationWorkflow: r"""Creates a migration workflow. @@ -258,7 +270,7 @@ async def sample_create_migration_workflow(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]]): The request object. Request to create a migration workflow resource. parent (:class:`str`): @@ -335,11 +347,13 @@ async def sample_create_migration_workflow(): async def get_migration_workflow( self, - request: Union[migration_service.GetMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationWorkflowRequest, 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]] = (), ) -> migration_entities.MigrationWorkflow: r"""Gets a previously created migration workflow. @@ -371,7 +385,7 @@ async def sample_get_migration_workflow(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]]): The request object. A request to get a previously created migration workflow. name (:class:`str`): @@ -448,11 +462,13 @@ async def sample_get_migration_workflow(): async def list_migration_workflows( self, - request: Union[migration_service.ListMigrationWorkflowsRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationWorkflowsRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationWorkflowsAsyncPager: r"""Lists previously created migration workflow. @@ -485,7 +501,7 @@ async def sample_list_migration_workflows(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]]): The request object. A request to list previously created migration workflows. parent (:class:`str`): @@ -572,11 +588,13 @@ async def sample_list_migration_workflows(): async def delete_migration_workflow( self, - request: Union[migration_service.DeleteMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.DeleteMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Deletes a migration workflow by name. @@ -605,7 +623,7 @@ async def sample_delete_migration_workflow(): await client.delete_migration_workflow(request=request) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]]): The request object. A request to delete a previously created migration workflow. name (:class:`str`): @@ -663,11 +681,13 @@ async def sample_delete_migration_workflow(): async def start_migration_workflow( self, - request: Union[migration_service.StartMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.StartMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Starts a previously created migration workflow. I.e., @@ -700,7 +720,7 @@ async def sample_start_migration_workflow(): await client.start_migration_workflow(request=request) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]]): The request object. A request to start a previously created migration workflow. name (:class:`str`): @@ -767,11 +787,13 @@ async def sample_start_migration_workflow(): async def get_migration_subtask( self, - request: Union[migration_service.GetMigrationSubtaskRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationSubtaskRequest, 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]] = (), ) -> migration_entities.MigrationSubtask: r"""Gets a previously created migration subtask. @@ -803,7 +825,7 @@ async def sample_get_migration_subtask(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]]): The request object. A request to get a previously created migration subtasks. name (:class:`str`): @@ -883,11 +905,13 @@ async def sample_get_migration_subtask(): async def list_migration_subtasks( self, - request: Union[migration_service.ListMigrationSubtasksRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationSubtasksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationSubtasksAsyncPager: r"""Lists previously created migration subtasks. @@ -920,7 +944,7 @@ async def sample_list_migration_subtasks(): print(response) Args: - request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]): + request (Optional[Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]]): The request object. A request to list previously created migration subtasks. parent (:class:`str`): diff --git a/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py b/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py index b0011cf..9df02e9 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py @@ -16,7 +16,18 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union +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 @@ -66,7 +77,7 @@ class MigrationServiceClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[MigrationServiceTransport]: """Returns an appropriate transport class. @@ -365,8 +376,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, MigrationServiceTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, MigrationServiceTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the migration service client. @@ -380,7 +391,7 @@ def __init__( transport (Union[str, MigrationServiceTransport]): The transport to use. If set to None, a transport is chosen automatically. - client_options (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -410,6 +421,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -462,12 +474,14 @@ def __init__( def create_migration_workflow( self, - request: Union[migration_service.CreateMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.CreateMigrationWorkflowRequest, dict] + ] = None, *, - parent: str = None, - migration_workflow: migration_entities.MigrationWorkflow = None, + parent: Optional[str] = None, + migration_workflow: Optional[migration_entities.MigrationWorkflow] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> migration_entities.MigrationWorkflow: r"""Creates a migration workflow. @@ -578,11 +592,13 @@ def sample_create_migration_workflow(): def get_migration_workflow( self, - request: Union[migration_service.GetMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationWorkflowRequest, 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]] = (), ) -> migration_entities.MigrationWorkflow: r"""Gets a previously created migration workflow. @@ -682,11 +698,13 @@ def sample_get_migration_workflow(): def list_migration_workflows( self, - request: Union[migration_service.ListMigrationWorkflowsRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationWorkflowsRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationWorkflowsPager: r"""Lists previously created migration workflow. @@ -797,11 +815,13 @@ def sample_list_migration_workflows(): def delete_migration_workflow( self, - request: Union[migration_service.DeleteMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.DeleteMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Deletes a migration workflow by name. @@ -890,11 +910,13 @@ def sample_delete_migration_workflow(): def start_migration_workflow( self, - request: Union[migration_service.StartMigrationWorkflowRequest, dict] = None, + request: Optional[ + Union[migration_service.StartMigrationWorkflowRequest, 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]] = (), ) -> None: r"""Starts a previously created migration workflow. I.e., @@ -985,11 +1007,13 @@ def sample_start_migration_workflow(): def get_migration_subtask( self, - request: Union[migration_service.GetMigrationSubtaskRequest, dict] = None, + request: Optional[ + Union[migration_service.GetMigrationSubtaskRequest, 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]] = (), ) -> migration_entities.MigrationSubtask: r"""Gets a previously created migration subtask. @@ -1092,11 +1116,13 @@ def sample_get_migration_subtask(): def list_migration_subtasks( self, - request: Union[migration_service.ListMigrationSubtasksRequest, dict] = None, + request: Optional[ + Union[migration_service.ListMigrationSubtasksRequest, dict] + ] = None, *, - parent: str = None, + parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMigrationSubtasksPager: r"""Lists previously created migration subtasks. diff --git a/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/base.py b/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/base.py index e59d9ea..ed37d52 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/base.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/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/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py b/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py index 1f4729b..98d2d71 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc.py @@ -50,14 +50,14 @@ def __init__( self, *, host: str = "bigquerymigration.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, @@ -184,8 +184,8 @@ def __init__( def create_channel( cls, host: str = "bigquerymigration.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/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc_asyncio.py b/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc_asyncio.py index 3bf5e0c..efb8e90 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/transports/grpc_asyncio.py @@ -52,7 +52,7 @@ class MigrationServiceGrpcAsyncIOTransport(MigrationServiceTransport): def create_channel( cls, host: str = "bigquerymigration.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, @@ -95,15 +95,15 @@ def __init__( self, *, host: str = "bigquerymigration.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/google/cloud/bigquery_migration_v2alpha/types/assessment_task.py b/google/cloud/bigquery_migration_v2alpha/types/assessment_task.py index 9688fc7..62e96d4 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/assessment_task.py +++ b/google/cloud/bigquery_migration_v2alpha/types/assessment_task.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( @@ -43,19 +45,19 @@ class AssessmentTaskDetails(proto.Message): input data is extracted. """ - input_path = proto.Field( + input_path: str = proto.Field( proto.STRING, number=1, ) - output_dataset = proto.Field( + output_dataset: str = proto.Field( proto.STRING, number=2, ) - querylogs_path = proto.Field( + querylogs_path: str = proto.Field( proto.STRING, number=3, ) - data_source = proto.Field( + data_source: str = proto.Field( proto.STRING, number=4, ) @@ -70,7 +72,7 @@ class AssessmentOrchestrationResultDetails(proto.Message): table schemas. """ - output_tables_schema_version = proto.Field( + output_tables_schema_version: str = proto.Field( proto.STRING, number=1, ) diff --git a/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py b/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py index 47885ef..23dc712 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py +++ b/google/cloud/bigquery_migration_v2alpha/types/migration_entities.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 any_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import error_details_pb2 # type: ignore @@ -50,7 +52,7 @@ class MigrationWorkflow(proto.Message): The display name of the workflow. This can be set to give a workflow a descriptive name. There is no guarantee or enforcement of uniqueness. - tasks (Mapping[str, google.cloud.bigquery_migration_v2alpha.types.MigrationTask]): + tasks (MutableMapping[str, google.cloud.bigquery_migration_v2alpha.types.MigrationTask]): The tasks in a workflow in a named map. The name (i.e. key) has no meaning and is merely a convenient way to address a specific task in a @@ -71,31 +73,31 @@ class State(proto.Enum): PAUSED = 3 COMPLETED = 4 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=6, ) - tasks = proto.MapField( + tasks: MutableMapping[str, "MigrationTask"] = proto.MapField( proto.STRING, proto.MESSAGE, number=2, message="MigrationTask", ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=3, enum=State, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp, @@ -158,52 +160,52 @@ class State(proto.Enum): SUCCEEDED = 5 FAILED = 6 - assessment_task_details = proto.Field( + assessment_task_details: assessment_task.AssessmentTaskDetails = proto.Field( proto.MESSAGE, number=12, oneof="task_details", message=assessment_task.AssessmentTaskDetails, ) - translation_task_details = proto.Field( + translation_task_details: translation_task.TranslationTaskDetails = proto.Field( proto.MESSAGE, number=13, oneof="task_details", message=translation_task.TranslationTaskDetails, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=1, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=2, ) - details = proto.Field( + details: any_pb2.Any = proto.Field( proto.MESSAGE, number=3, message=any_pb2.Any, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=4, enum=State, ) - processing_error = proto.Field( + processing_error: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=5, message=error_details_pb2.ErrorInfo, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp, ) - orchestration_result = proto.Field( + orchestration_result: "MigrationTaskOrchestrationResult" = proto.Field( proto.MESSAGE, number=10, message="MigrationTaskOrchestrationResult", @@ -239,7 +241,7 @@ class MigrationSubtask(proto.Message): processing_error (google.rpc.error_details_pb2.ErrorInfo): Output only. An explanation that may be populated when the task is in FAILED state. - resource_error_details (Sequence[google.cloud.bigquery_migration_v2alpha.types.ResourceErrorDetail]): + resource_error_details (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.ResourceErrorDetail]): Output only. Provides details to errors and issues encountered while processing the subtask. Presence of error details does not mean that the @@ -254,7 +256,7 @@ class MigrationSubtask(proto.Message): Time when the subtask was created. last_update_time (google.protobuf.timestamp_pb2.Timestamp): Time when the subtask was last updated. - metrics (Sequence[google.cloud.bigquery_migration_v2alpha.types.TimeSeries]): + metrics (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.TimeSeries]): The metrics for the subtask. """ @@ -267,48 +269,50 @@ class State(proto.Enum): FAILED = 4 PAUSED = 5 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - task_id = proto.Field( + task_id: str = proto.Field( proto.STRING, number=2, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3, ) - state = proto.Field( + state: State = proto.Field( proto.ENUM, number=5, enum=State, ) - processing_error = proto.Field( + processing_error: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=6, message=error_details_pb2.ErrorInfo, ) - resource_error_details = proto.RepeatedField( + resource_error_details: MutableSequence[ + migration_error_details.ResourceErrorDetail + ] = proto.RepeatedField( proto.MESSAGE, number=12, message=migration_error_details.ResourceErrorDetail, ) - resource_error_count = proto.Field( + resource_error_count: int = proto.Field( proto.INT32, number=13, ) - create_time = proto.Field( + create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp, ) - last_update_time = proto.Field( + last_update_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp, ) - metrics = proto.RepeatedField( + metrics: MutableSequence[migration_metrics.TimeSeries] = proto.RepeatedField( proto.MESSAGE, number=11, message=migration_metrics.TimeSeries, @@ -329,11 +333,13 @@ class MigrationTaskOrchestrationResult(proto.Message): This field is a member of `oneof`_ ``details``. """ - assessment_details = proto.Field( - proto.MESSAGE, - number=1, - oneof="details", - message=assessment_task.AssessmentOrchestrationResultDetails, + assessment_details: assessment_task.AssessmentOrchestrationResultDetails = ( + proto.Field( + proto.MESSAGE, + number=1, + oneof="details", + message=assessment_task.AssessmentOrchestrationResultDetails, + ) ) diff --git a/google/cloud/bigquery_migration_v2alpha/types/migration_error_details.py b/google/cloud/bigquery_migration_v2alpha/types/migration_error_details.py index fedccca..b6b1b5b 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/migration_error_details.py +++ b/google/cloud/bigquery_migration_v2alpha/types/migration_error_details.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.rpc import error_details_pb2 # type: ignore import proto # type: ignore @@ -33,7 +35,7 @@ class ResourceErrorDetail(proto.Message): resource_info (google.rpc.error_details_pb2.ResourceInfo): Required. Information about the resource where the error is located. - error_details (Sequence[google.cloud.bigquery_migration_v2alpha.types.ErrorDetail]): + error_details (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.ErrorDetail]): Required. The error details for the resource. error_count (int): Required. How many errors there are in total for the @@ -42,17 +44,17 @@ class ResourceErrorDetail(proto.Message): ``error_details``. """ - resource_info = proto.Field( + resource_info: error_details_pb2.ResourceInfo = proto.Field( proto.MESSAGE, number=1, message=error_details_pb2.ResourceInfo, ) - error_details = proto.RepeatedField( + error_details: MutableSequence["ErrorDetail"] = proto.RepeatedField( proto.MESSAGE, number=2, message="ErrorDetail", ) - error_count = proto.Field( + error_count: int = proto.Field( proto.INT32, number=3, ) @@ -71,12 +73,12 @@ class ErrorDetail(proto.Message): with structured detail. """ - location = proto.Field( + location: "ErrorLocation" = proto.Field( proto.MESSAGE, number=1, message="ErrorLocation", ) - error_info = proto.Field( + error_info: error_details_pb2.ErrorInfo = proto.Field( proto.MESSAGE, number=2, message=error_details_pb2.ErrorInfo, @@ -97,11 +99,11 @@ class ErrorLocation(proto.Message): that there is no columns information. """ - line = proto.Field( + line: int = proto.Field( proto.INT32, number=1, ) - column = proto.Field( + column: int = proto.Field( proto.INT32, number=2, ) diff --git a/google/cloud/bigquery_migration_v2alpha/types/migration_metrics.py b/google/cloud/bigquery_migration_v2alpha/types/migration_metrics.py index 761250d..ba216c1 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/migration_metrics.py +++ b/google/cloud/bigquery_migration_v2alpha/types/migration_metrics.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.api import distribution_pb2 # type: ignore from google.api import metric_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore @@ -47,7 +49,7 @@ class TimeSeries(proto.Message): must be auto-created, then this field specifies the metric kind of the new descriptor and must be either ``GAUGE`` (the default) or ``CUMULATIVE``. - points (Sequence[google.cloud.bigquery_migration_v2alpha.types.Point]): + points (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.Point]): Required. The data points of this time series. When listing time series, points are returned in reverse time order. @@ -59,21 +61,21 @@ class TimeSeries(proto.Message): ``BOOL``, ``INT64``, ``DOUBLE``, or ``DISTRIBUTION``. """ - metric = proto.Field( + metric: str = proto.Field( proto.STRING, number=1, ) - value_type = proto.Field( + value_type: metric_pb2.MetricDescriptor.ValueType = proto.Field( proto.ENUM, number=2, enum=metric_pb2.MetricDescriptor.ValueType, ) - metric_kind = proto.Field( + metric_kind: metric_pb2.MetricDescriptor.MetricKind = proto.Field( proto.ENUM, number=3, enum=metric_pb2.MetricDescriptor.MetricKind, ) - points = proto.RepeatedField( + points: MutableSequence["Point"] = proto.RepeatedField( proto.MESSAGE, number=4, message="Point", @@ -100,12 +102,12 @@ class Point(proto.Message): The value of the data point. """ - interval = proto.Field( + interval: "TimeInterval" = proto.Field( proto.MESSAGE, number=1, message="TimeInterval", ) - value = proto.Field( + value: "TypedValue" = proto.Field( proto.MESSAGE, number=2, message="TypedValue", @@ -127,12 +129,12 @@ class TimeInterval(proto.Message): Required. The end of the time interval. """ - start_time = proto.Field( + start_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, ) - end_time = proto.Field( + end_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, @@ -176,27 +178,27 @@ class TypedValue(proto.Message): This field is a member of `oneof`_ ``value``. """ - bool_value = proto.Field( + bool_value: bool = proto.Field( proto.BOOL, number=1, oneof="value", ) - int64_value = proto.Field( + int64_value: int = proto.Field( proto.INT64, number=2, oneof="value", ) - double_value = proto.Field( + double_value: float = proto.Field( proto.DOUBLE, number=3, oneof="value", ) - string_value = proto.Field( + string_value: str = proto.Field( proto.STRING, number=4, oneof="value", ) - distribution_value = proto.Field( + distribution_value: distribution_pb2.Distribution = proto.Field( proto.MESSAGE, number=5, oneof="value", diff --git a/google/cloud/bigquery_migration_v2alpha/types/migration_service.py b/google/cloud/bigquery_migration_v2alpha/types/migration_service.py index 76bccf8..d49c19a 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/migration_service.py +++ b/google/cloud/bigquery_migration_v2alpha/types/migration_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 + from google.protobuf import field_mask_pb2 # type: ignore import proto # type: ignore @@ -45,11 +47,11 @@ class CreateMigrationWorkflowRequest(proto.Message): Required. The migration workflow to create. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - migration_workflow = proto.Field( + migration_workflow: migration_entities.MigrationWorkflow = proto.Field( proto.MESSAGE, number=2, message=migration_entities.MigrationWorkflow, @@ -67,11 +69,11 @@ class GetMigrationWorkflowRequest(proto.Message): The list of fields to be retrieved. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -101,20 +103,20 @@ class ListMigrationWorkflowsRequest(proto.Message): the page token. """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, ) - 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, ) @@ -124,7 +126,7 @@ class ListMigrationWorkflowsResponse(proto.Message): r"""Response object for a ``ListMigrationWorkflows`` call. Attributes: - migration_workflows (Sequence[google.cloud.bigquery_migration_v2alpha.types.MigrationWorkflow]): + migration_workflows (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.MigrationWorkflow]): The migration workflows for the specified project / location. next_page_token (str): @@ -137,12 +139,14 @@ class ListMigrationWorkflowsResponse(proto.Message): def raw_page(self): return self - migration_workflows = proto.RepeatedField( + migration_workflows: MutableSequence[ + migration_entities.MigrationWorkflow + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=migration_entities.MigrationWorkflow, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) @@ -157,7 +161,7 @@ class DeleteMigrationWorkflowRequest(proto.Message): Example: ``projects/123/locations/us/workflows/1234`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -172,7 +176,7 @@ class StartMigrationWorkflowRequest(proto.Message): Example: ``projects/123/locations/us/workflows/1234`` """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) @@ -190,11 +194,11 @@ class GetMigrationSubtaskRequest(proto.Message): Optional. The list of fields to be retrieved. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, @@ -229,24 +233,24 @@ class ListMigrationSubtasksRequest(proto.Message): ID (not the name in the named map). """ - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=1, ) - read_mask = proto.Field( + read_mask: field_mask_pb2.FieldMask = proto.Field( proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask, ) - 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, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=5, ) @@ -256,7 +260,7 @@ class ListMigrationSubtasksResponse(proto.Message): r"""Response object for a ``ListMigrationSubtasks`` call. Attributes: - migration_subtasks (Sequence[google.cloud.bigquery_migration_v2alpha.types.MigrationSubtask]): + migration_subtasks (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.MigrationSubtask]): The migration subtasks for the specified task. next_page_token (str): @@ -269,12 +273,14 @@ class ListMigrationSubtasksResponse(proto.Message): def raw_page(self): return self - migration_subtasks = proto.RepeatedField( + migration_subtasks: MutableSequence[ + migration_entities.MigrationSubtask + ] = proto.RepeatedField( proto.MESSAGE, number=1, message=migration_entities.MigrationSubtask, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=2, ) diff --git a/google/cloud/bigquery_migration_v2alpha/types/translation_task.py b/google/cloud/bigquery_migration_v2alpha/types/translation_task.py index 5c2b58a..929c73a 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/translation_task.py +++ b/google/cloud/bigquery_migration_v2alpha/types/translation_task.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,11 +44,11 @@ class TranslationFileMapping(proto.Message): corresponding input file to. """ - input_path = proto.Field( + input_path: str = proto.Field( proto.STRING, number=1, ) - output_path = proto.Field( + output_path: str = proto.Field( proto.STRING, number=2, ) @@ -80,7 +82,7 @@ class TranslationTaskDetails(proto.Message): output_path (str): The Cloud Storage path for translation output files. - file_paths (Sequence[google.cloud.bigquery_migration_v2alpha.types.TranslationFileMapping]): + file_paths (MutableSequence[google.cloud.bigquery_migration_v2alpha.types.TranslationFileMapping]): Cloud Storage files to be processed for translation. schema_path (str): @@ -90,7 +92,7 @@ class TranslationTaskDetails(proto.Message): The file encoding type. identifier_settings (google.cloud.bigquery_migration_v2alpha.types.IdentifierSettings): The settings for SQL identifiers. - special_token_map (Mapping[str, google.cloud.bigquery_migration_v2alpha.types.TranslationTaskDetails.TokenType]): + special_token_map (MutableMapping[str, google.cloud.bigquery_migration_v2alpha.types.TranslationTaskDetails.TokenType]): The map capturing special tokens to be replaced during translation. The key is special token in string. The value is the token data @@ -134,57 +136,57 @@ class TokenType(proto.Enum): DATE = 6 TIMESTAMP = 7 - teradata_options = proto.Field( + teradata_options: "TeradataOptions" = proto.Field( proto.MESSAGE, number=10, oneof="language_options", message="TeradataOptions", ) - bteq_options = proto.Field( + bteq_options: "BteqOptions" = proto.Field( proto.MESSAGE, number=11, oneof="language_options", message="BteqOptions", ) - input_path = proto.Field( + input_path: str = proto.Field( proto.STRING, number=1, ) - output_path = proto.Field( + output_path: str = proto.Field( proto.STRING, number=2, ) - file_paths = proto.RepeatedField( + file_paths: MutableSequence["TranslationFileMapping"] = proto.RepeatedField( proto.MESSAGE, number=12, message="TranslationFileMapping", ) - schema_path = proto.Field( + schema_path: str = proto.Field( proto.STRING, number=3, ) - file_encoding = proto.Field( + file_encoding: FileEncoding = proto.Field( proto.ENUM, number=4, enum=FileEncoding, ) - identifier_settings = proto.Field( + identifier_settings: "IdentifierSettings" = proto.Field( proto.MESSAGE, number=5, message="IdentifierSettings", ) - special_token_map = proto.MapField( + special_token_map: MutableMapping[str, TokenType] = proto.MapField( proto.STRING, proto.ENUM, number=6, enum=TokenType, ) - filter = proto.Field( + filter: "Filter" = proto.Field( proto.MESSAGE, number=7, message="Filter", ) - translation_exception_table = proto.Field( + translation_exception_table: str = proto.Field( proto.STRING, number=13, ) @@ -194,12 +196,12 @@ class Filter(proto.Message): r"""The filter applied to fields of translation details. Attributes: - input_file_exclusion_prefixes (Sequence[str]): + input_file_exclusion_prefixes (MutableSequence[str]): The list of prefixes used to exclude processing for input files. """ - input_file_exclusion_prefixes = proto.RepeatedField( + input_file_exclusion_prefixes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=1, ) @@ -230,12 +232,12 @@ class IdentifierRewriteMode(proto.Enum): NONE = 1 REWRITE_ALL = 2 - output_identifier_case = proto.Field( + output_identifier_case: IdentifierCase = proto.Field( proto.ENUM, number=1, enum=IdentifierCase, ) - identifier_rewrite_mode = proto.Field( + identifier_rewrite_mode: IdentifierRewriteMode = proto.Field( proto.ENUM, number=2, enum=IdentifierRewriteMode, @@ -258,23 +260,23 @@ class BteqOptions(proto.Message): The Cloud Storage location to be used as the default path for files that are not otherwise specified in the file replacement map. - file_replacement_map (Mapping[str, str]): + file_replacement_map (MutableMapping[str, str]): Maps the local paths that are used in BTEQ scripts (the keys) to the paths in Cloud Storage that should be used in their stead in the translation (the value). """ - project_dataset = proto.Field( + project_dataset: "DatasetReference" = proto.Field( proto.MESSAGE, number=1, message="DatasetReference", ) - default_path_uri = proto.Field( + default_path_uri: str = proto.Field( proto.STRING, number=2, ) - file_replacement_map = proto.MapField( + file_replacement_map: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=3, @@ -294,11 +296,11 @@ class DatasetReference(proto.Message): dataset. """ - dataset_id = proto.Field( + dataset_id: str = proto.Field( proto.STRING, number=1, ) - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=2, ) diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 0000000..ce738f0 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,56 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +from pathlib import Path +import shutil + +import synthtool as s +import synthtool.gcp as gcp +from synthtool.languages import python + +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- + +clean_up_generated_samples = True + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) + +for library in s.get_staging_dirs(default_version): + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False + s.move([library], excludes=["**/gapic_version.py"]) +s.remove_staging_dirs() + +# ---------------------------------------------------------------------------- +# Add templated files +# ---------------------------------------------------------------------------- + +templated_files = gcp.CommonTemplates().py_library( + cov_level=100, + microgenerator=True, + versions=gcp.common.detect_versions(path="./google", default_first=True), +) +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml"]) + +python.py_samples(skip_readmes=True) + +# run format session for all directories which have a noxfile +for noxfile in Path(".").glob("**/noxfile.py"): + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..f0210ce --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/bigquery_migration/gapic_version.py", + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json", + "jsonpath": "$.clientLibrary.version" + }, + { + "type": "json", + "path": "samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json", + "jsonpath": "$.clientLibrary.version" + } + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} diff --git a/samples/generated_samples/snippet_metadata_bigquery migration_v2.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json similarity index 99% rename from samples/generated_samples/snippet_metadata_bigquery migration_v2.json rename to samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json index ad3b439..eb49516 100644 --- a/samples/generated_samples/snippet_metadata_bigquery migration_v2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-bigquery-migration" + "name": "google-cloud-bigquery-migration", + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_bigquery migration_v2alpha.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json similarity index 99% rename from samples/generated_samples/snippet_metadata_bigquery migration_v2alpha.json rename to samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json index dea1e77..b95cbec 100644 --- a/samples/generated_samples/snippet_metadata_bigquery migration_v2alpha.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -7,7 +7,8 @@ } ], "language": "PYTHON", - "name": "google-cloud-bigquery-migration" + "name": "google-cloud-bigquery-migration", + "version": "0.1.0" }, "snippets": [ { diff --git a/setup.py b/setup.py index a8e2df5..826a1c8 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +18,31 @@ import setuptools # type: ignore -version = "0.7.2" +package_root = os.path.abspath(os.path.dirname(__file__)) + +name = "google-cloud-bigquery-migration" + + +description = "Google Cloud Bigquery Migration API client library" + +version = {} +with open( + os.path.join(package_root, "google/cloud/bigquery_migration/gapic_version.py") +) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + +dependencies = [ + "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "proto-plus >= 1.22.0, <2.0.0dev", + "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", +] +url = "https://github.com/googleapis/python-bigquery-migration" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -26,35 +50,43 @@ with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() +packages = [ + package + for package in setuptools.PEP420PackageFinder.find() + if package.startswith("google") +] + +namespaces = ["google"] +if "google.cloud" in packages: + namespaces.append("google.cloud") + setuptools.setup( - name="google-cloud-bigquery-migration", + name=name, version=version, + description=description, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/googleapis/python-bigquery-migration", - packages=setuptools.PEP420PackageFinder.find(), - namespace_packages=("google", "google.cloud"), - platforms="Posix; MacOS X; Windows", - include_package_data=True, - install_requires=( - "google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", - "proto-plus >= 1.22.0, <2.0.0dev", - "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - ), - python_requires=">=3.7", + url=url, classifiers=[ - "Development Status :: 3 - Alpha", + release_status, "Intended Audience :: Developers", - "Operating System :: OS Independent", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Operating System :: OS Independent", "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules", ], + platforms="Posix; MacOS X; Windows", + packages=packages, + python_requires=">=3.7", + namespace_packages=namespaces, + install_requires=dependencies, + include_package_data=True, zip_safe=False, ) diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.11.txt +++ b/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 28b4190..6f3158c 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -1,11 +1,9 @@ # This constraints file is used to check that lower bounds # are correct in setup.py -# List *all* library dependencies and extras in this file. +# List all library dependencies and extras in this file. # Pin the version to the lower bound. -# -# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-api-core==1.32.0 +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", +# Then this file should have google-cloud-foo==1.14.0 +google-api-core==1.33.2 proto-plus==1.22.0 -libcst==0.2.5 protobuf==3.19.5 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index e69de29..ed7f9ae 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf