From d11aa1fdb4a7d9c7e0bb270ad5b8306a91485818 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:24:13 -0400 Subject: [PATCH] feat: Add request_source field (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add request_source field and update formatting PiperOrigin-RevId: 518330942 Source-Link: https://github.com/googleapis/googleapis/commit/184334dec867cbc99734771f5a101d65f6959287 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e999b9e556884c94ee2fb4110aa3087d0dc96b5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWU5OTliOWU1NTY4ODRjOTRlZTJmYjQxMTBhYTMwODdkMGRjOTZiNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../types/migration_entities.py | 6 +++- .../types/translation_config.py | 29 ++++++++++++------- ...ta_google.cloud.bigquery.migration.v2.json | 2 +- ...ogle.cloud.bigquery.migration.v2alpha.json | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/google/cloud/bigquery_migration_v2/types/migration_entities.py b/google/cloud/bigquery_migration_v2/types/migration_entities.py index ae0baa4..e7db80c 100644 --- a/google/cloud/bigquery_migration_v2/types/migration_entities.py +++ b/google/cloud/bigquery_migration_v2/types/migration_entities.py @@ -147,7 +147,7 @@ class MigrationTask(proto.Message): Translation_Snowflake2BQ, Translation_Netezza2BQ, Translation_AzureSynapse2BQ, Translation_Vertica2BQ, Translation_SQLServer2BQ, Translation_Presto2BQ, - Translation_MySQL2BQ. + Translation_MySQL2BQ, Translation_Postgresql2BQ. state (google.cloud.bigquery_migration_v2.types.MigrationTask.State): Output only. The current state of the task. processing_error (google.rpc.error_details_pb2.ErrorInfo): @@ -295,6 +295,9 @@ class State(proto.Enum): scheduled. If it was already assigned,it might still finish but no new lease renewals will be granted. + PENDING_DEPENDENCY (6): + The subtask is pending a dependency. It will + be scheduled once its dependencies are done. """ STATE_UNSPECIFIED = 0 ACTIVE = 1 @@ -302,6 +305,7 @@ class State(proto.Enum): SUCCEEDED = 3 FAILED = 4 PAUSED = 5 + PENDING_DEPENDENCY = 6 name: str = proto.Field( proto.STRING, diff --git a/google/cloud/bigquery_migration_v2/types/translation_config.py b/google/cloud/bigquery_migration_v2/types/translation_config.py index 741d9fe..05395c0 100644 --- a/google/cloud/bigquery_migration_v2/types/translation_config.py +++ b/google/cloud/bigquery_migration_v2/types/translation_config.py @@ -65,19 +65,22 @@ class TranslationConfigDetails(proto.Message): corresponding input files to. This field is a member of `oneof`_ ``target_location``. - source_dialect (google.cloud.bigquery_migration_v2.types.Dialect): - The dialect of the input files. - target_dialect (google.cloud.bigquery_migration_v2.types.Dialect): - The target dialect for the engine to - translate the input to. name_mapping_list (google.cloud.bigquery_migration_v2.types.ObjectNameMappingList): The mapping of objects to their desired output names in list form. This field is a member of `oneof`_ ``output_name_mapping``. + source_dialect (google.cloud.bigquery_migration_v2.types.Dialect): + The dialect of the input files. + target_dialect (google.cloud.bigquery_migration_v2.types.Dialect): + The target dialect for the engine to + translate the input to. source_env (google.cloud.bigquery_migration_v2.types.SourceEnv): The default source environment values for the translation. + request_source (str): + The indicator to show translation request + initiator. """ gcs_source_path: str = proto.Field( @@ -90,6 +93,12 @@ class TranslationConfigDetails(proto.Message): number=2, oneof="target_location", ) + name_mapping_list: "ObjectNameMappingList" = proto.Field( + proto.MESSAGE, + number=5, + oneof="output_name_mapping", + message="ObjectNameMappingList", + ) source_dialect: "Dialect" = proto.Field( proto.MESSAGE, number=3, @@ -100,17 +109,15 @@ class TranslationConfigDetails(proto.Message): number=4, message="Dialect", ) - name_mapping_list: "ObjectNameMappingList" = proto.Field( - proto.MESSAGE, - number=5, - oneof="output_name_mapping", - message="ObjectNameMappingList", - ) source_env: "SourceEnv" = proto.Field( proto.MESSAGE, number=6, message="SourceEnv", ) + request_source: str = proto.Field( + proto.STRING, + number=8, + ) class Dialect(proto.Message): 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 24663c5..eb49516 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.10.0" + "version": "0.1.0" }, "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 0169709..1457555 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.10.0" + "version": "0.1.0" }, "snippets": [ {