diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 76d5538..b28fea9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.9.0" + ".": "0.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 39758e4..03f75a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.9.1](https://github.com/googleapis/python-bigquery-migration/compare/v0.9.0...v0.9.1) (2023-01-20) + + +### Bug Fixes + +* Add context manager return types ([970281e](https://github.com/googleapis/python-bigquery-migration/commit/970281ecea66632b651f8346166509e0e7160168)) + + +### Documentation + +* Add documentation for enums ([970281e](https://github.com/googleapis/python-bigquery-migration/commit/970281ecea66632b651f8346166509e0e7160168)) + ## [0.9.0](https://github.com/googleapis/python-bigquery-migration/compare/v0.8.0...v0.9.0) (2023-01-10) diff --git a/google/cloud/bigquery_migration/gapic_version.py b/google/cloud/bigquery_migration/gapic_version.py index 8e0b747..f7e843c 100644 --- a/google/cloud/bigquery_migration/gapic_version.py +++ b/google/cloud/bigquery_migration/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.9.1" # {x-release-please-version} diff --git a/google/cloud/bigquery_migration_v2/gapic_version.py b/google/cloud/bigquery_migration_v2/gapic_version.py index 8e0b747..f7e843c 100644 --- a/google/cloud/bigquery_migration_v2/gapic_version.py +++ b/google/cloud/bigquery_migration_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.9.1" # {x-release-please-version} 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 ec02647..882f8af 100644 --- a/google/cloud/bigquery_migration_v2/services/migration_service/client.py +++ b/google/cloud/bigquery_migration_v2/services/migration_service/client.py @@ -1231,7 +1231,7 @@ def sample_list_migration_subtasks(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "MigrationServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/bigquery_migration_v2/types/migration_entities.py b/google/cloud/bigquery_migration_v2/types/migration_entities.py index f2c8805..18e87f5 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_entities.py +++ b/google/cloud/bigquery_migration_v2/types/migration_entities.py @@ -63,7 +63,27 @@ class MigrationWorkflow(proto.Message): """ class State(proto.Enum): - r"""Possible migration workflow states.""" + r"""Possible migration workflow states. + + Values: + STATE_UNSPECIFIED (0): + Workflow state is unspecified. + DRAFT (1): + Workflow is in draft status, i.e. tasks are + not yet eligible for execution. + RUNNING (2): + Workflow is running (i.e. tasks are eligible + for execution). + PAUSED (3): + Workflow is paused. Tasks currently in + progress may continue, but no further tasks will + be scheduled. + COMPLETED (4): + Workflow is complete. There should not be any + task in a non-terminal state, but if they are + (e.g. forced termination), they will not be + scheduled. + """ STATE_UNSPECIFIED = 0 DRAFT = 1 RUNNING = 2 @@ -138,7 +158,26 @@ class MigrationTask(proto.Message): """ class State(proto.Enum): - r"""Possible states of a migration task.""" + r"""Possible states of a migration task. + + Values: + STATE_UNSPECIFIED (0): + The state is unspecified. + PENDING (1): + The task is waiting for orchestration. + ORCHESTRATING (2): + The task is assigned to an orchestrator. + RUNNING (3): + The task is running, i.e. its subtasks are + ready for execution. + PAUSED (4): + Tha task is paused. Assigned subtasks can + continue, but no new subtasks will be scheduled. + SUCCEEDED (5): + The task finished successfully. + FAILED (6): + The task finished unsuccessfully. + """ STATE_UNSPECIFIED = 0 PENDING = 1 ORCHESTRATING = 2 @@ -234,7 +273,27 @@ class MigrationSubtask(proto.Message): """ class State(proto.Enum): - r"""Possible states of a migration subtask.""" + r"""Possible states of a migration subtask. + + Values: + STATE_UNSPECIFIED (0): + The state is unspecified. + ACTIVE (1): + The subtask is ready, i.e. it is ready for + execution. + RUNNING (2): + The subtask is running, i.e. it is assigned + to a worker for execution. + SUCCEEDED (3): + The subtask finished successfully. + FAILED (4): + The subtask finished unsuccessfully. + PAUSED (5): + The subtask is paused, i.e., it will not be + scheduled. If it was already assigned,it might + still finish but no new lease renewals will be + granted. + """ STATE_UNSPECIFIED = 0 ACTIVE = 1 RUNNING = 2 diff --git a/google/cloud/bigquery_migration_v2/types/translation_config.py b/google/cloud/bigquery_migration_v2/types/translation_config.py index 02f30e6..6c495f1 100644 --- a/google/cloud/bigquery_migration_v2/types/translation_config.py +++ b/google/cloud/bigquery_migration_v2/types/translation_config.py @@ -288,7 +288,16 @@ class TeradataDialect(proto.Message): """ class Mode(proto.Enum): - r"""The sub-dialect options for Teradata.""" + r"""The sub-dialect options for Teradata. + + Values: + MODE_UNSPECIFIED (0): + Unspecified mode. + SQL (1): + Teradata SQL mode. + BTEQ (2): + BTEQ mode (which includes SQL). + """ MODE_UNSPECIFIED = 0 SQL = 1 BTEQ = 2 @@ -404,7 +413,27 @@ class NameMappingKey(proto.Message): """ class Type(proto.Enum): - r"""The type of the object that is being mapped.""" + r"""The type of the object that is being mapped. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified name mapping type. + DATABASE (1): + The object being mapped is a database. + SCHEMA (2): + The object being mapped is a schema. + RELATION (3): + The object being mapped is a relation. + ATTRIBUTE (4): + The object being mapped is an attribute. + RELATION_ALIAS (5): + The object being mapped is a relation alias. + ATTRIBUTE_ALIAS (6): + The object being mapped is a an attribute + alias. + FUNCTION (7): + The object being mapped is a function. + """ TYPE_UNSPECIFIED = 0 DATABASE = 1 SCHEMA = 2 diff --git a/google/cloud/bigquery_migration_v2alpha/gapic_version.py b/google/cloud/bigquery_migration_v2alpha/gapic_version.py index 8e0b747..f7e843c 100644 --- a/google/cloud/bigquery_migration_v2alpha/gapic_version.py +++ b/google/cloud/bigquery_migration_v2alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.9.1" # {x-release-please-version} 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 aef7d51..70d75f9 100644 --- a/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py +++ b/google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py @@ -1231,7 +1231,7 @@ def sample_list_migration_subtasks(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "MigrationServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py b/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py index 23dc712..14d6a20 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py +++ b/google/cloud/bigquery_migration_v2alpha/types/migration_entities.py @@ -66,7 +66,27 @@ class MigrationWorkflow(proto.Message): """ class State(proto.Enum): - r"""Possible migration workflow states.""" + r"""Possible migration workflow states. + + Values: + STATE_UNSPECIFIED (0): + Workflow state is unspecified. + DRAFT (1): + Workflow is in draft status, i.e. tasks are + not yet eligible for execution. + RUNNING (2): + Workflow is running (i.e. tasks are eligible + for execution). + PAUSED (3): + Workflow is paused. Tasks currently in + progress may continue, but no further tasks will + be scheduled. + COMPLETED (4): + Workflow is complete. There should not be any + task in a non-terminal state, but if they are + (e.g. forced termination), they will not be + scheduled. + """ STATE_UNSPECIFIED = 0 DRAFT = 1 RUNNING = 2 @@ -151,7 +171,26 @@ class MigrationTask(proto.Message): """ class State(proto.Enum): - r"""Possible states of a migration task.""" + r"""Possible states of a migration task. + + Values: + STATE_UNSPECIFIED (0): + The state is unspecified. + PENDING (1): + The task is waiting for orchestration. + ORCHESTRATING (2): + The task is assigned to an orchestrator. + RUNNING (3): + The task is running, i.e. its subtasks are + ready for execution. + PAUSED (4): + Tha task is paused. Assigned subtasks can + continue, but no new subtasks will be scheduled. + SUCCEEDED (5): + The task finished successfully. + FAILED (6): + The task finished unsuccessfully. + """ STATE_UNSPECIFIED = 0 PENDING = 1 ORCHESTRATING = 2 @@ -261,7 +300,27 @@ class MigrationSubtask(proto.Message): """ class State(proto.Enum): - r"""Possible states of a migration subtask.""" + r"""Possible states of a migration subtask. + + Values: + STATE_UNSPECIFIED (0): + The state is unspecified. + ACTIVE (1): + The subtask is ready, i.e. it is ready for + execution. + RUNNING (2): + The subtask is running, i.e. it is assigned + to a worker for execution. + SUCCEEDED (3): + The subtask finished successfully. + FAILED (4): + The subtask finished unsuccessfully. + PAUSED (5): + The subtask is paused, i.e., it will not be + scheduled. If it was already assigned,it might + still finish but no new lease renewals will be + granted. + """ STATE_UNSPECIFIED = 0 ACTIVE = 1 RUNNING = 2 diff --git a/google/cloud/bigquery_migration_v2alpha/types/translation_task.py b/google/cloud/bigquery_migration_v2alpha/types/translation_task.py index 929c73a..2c658c7 100644 --- a/google/cloud/bigquery_migration_v2alpha/types/translation_task.py +++ b/google/cloud/bigquery_migration_v2alpha/types/translation_task.py @@ -116,7 +116,24 @@ class TranslationTaskDetails(proto.Message): """ class FileEncoding(proto.Enum): - r"""The file encoding types.""" + r"""The file encoding types. + + Values: + FILE_ENCODING_UNSPECIFIED (0): + File encoding setting is not specified. + UTF_8 (1): + File encoding is UTF_8. + ISO_8859_1 (2): + File encoding is ISO_8859_1. + US_ASCII (3): + File encoding is US_ASCII. + UTF_16 (4): + File encoding is UTF_16. + UTF_16LE (5): + File encoding is UTF_16LE. + UTF_16BE (6): + File encoding is UTF_16BE. + """ FILE_ENCODING_UNSPECIFIED = 0 UTF_8 = 1 ISO_8859_1 = 2 @@ -126,7 +143,26 @@ class FileEncoding(proto.Enum): UTF_16BE = 6 class TokenType(proto.Enum): - r"""The special token data type.""" + r"""The special token data type. + + Values: + TOKEN_TYPE_UNSPECIFIED (0): + Token type is not specified. + STRING (1): + Token type as string. + INT64 (2): + Token type as integer. + NUMERIC (3): + Token type as numeric. + BOOL (4): + Token type as boolean. + FLOAT64 (5): + Token type as float. + DATE (6): + Token type as date. + TIMESTAMP (7): + Token type as timestamp. + """ TOKEN_TYPE_UNSPECIFIED = 0 STRING = 1 INT64 = 2 @@ -220,14 +256,35 @@ class IdentifierSettings(proto.Message): """ class IdentifierCase(proto.Enum): - r"""The identifier case type.""" + r"""The identifier case type. + + Values: + IDENTIFIER_CASE_UNSPECIFIED (0): + The identifier case is not specified. + ORIGINAL (1): + Identifiers' cases will be kept as the + original cases. + UPPER (2): + Identifiers will be in upper cases. + LOWER (3): + Identifiers will be in lower cases. + """ IDENTIFIER_CASE_UNSPECIFIED = 0 ORIGINAL = 1 UPPER = 2 LOWER = 3 class IdentifierRewriteMode(proto.Enum): - r"""The SQL identifier rewrite mode.""" + r"""The SQL identifier rewrite mode. + + Values: + IDENTIFIER_REWRITE_MODE_UNSPECIFIED (0): + SQL Identifier rewrite mode is unspecified. + NONE (1): + SQL identifiers won't be rewrite. + REWRITE_ALL (2): + All SQL identifiers will be rewrite. + """ IDENTIFIER_REWRITE_MODE_UNSPECIFIED = 0 NONE = 1 REWRITE_ALL = 2 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json index 1fa959f..db3a813 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-migration", - "version": "0.9.0" + "version": "0.9.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json index e75cac2..aaeb61e 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-migration", - "version": "0.9.0" + "version": "0.9.1" }, "snippets": [ { diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index deed735..f3ea4a8 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.2.0 +pytest==7.2.1 google-cloud-testutils==1.3.3 google-api-core==2.11.0 google-cloud-storage==2.7.0 \ No newline at end of file diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 8c3286d..3dae9dd 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.8.0 +google-cloud-bigquery-migration==0.9.0