diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto new file mode 100644 index 000000000000..2703f18c49bb --- /dev/null +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto @@ -0,0 +1,55 @@ +// Copyright 2026 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. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "AssessmentTaskProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// Assessment task config. +message AssessmentTaskDetails { + // Required. The Cloud Storage path for assessment input files. + string input_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery dataset for output. + string output_dataset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional Cloud Storage path to write the query logs (which is + // then used as an input path on the translation task) + string querylogs_path = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + // from which the input data is extracted. + string data_source = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A collection of additional feature flags for this assessment. + optional AssessmentFeatureHandle feature_handle = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// User-definable feature flags for assessment tasks. +message AssessmentFeatureHandle { + // Optional. Whether to create a dataset containing non-PII data in addition + // to the output dataset. + optional bool add_shareable_dataset = 1 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto index cefbe0666c62..775e3d426ee4 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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,6 +18,7 @@ package google.cloud.bigquery.migration.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2/assessment_task.proto"; import "google/cloud/bigquery/migration/v2/migration_error_details.proto"; import "google/cloud/bigquery/migration/v2/migration_metrics.proto"; import "google/cloud/bigquery/migration/v2/translation_config.proto"; @@ -85,11 +86,13 @@ message MigrationWorkflow { // Output only. That status of the workflow. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the workflow was created. - google.protobuf.Timestamp create_time = 4; + // Output only. Time when the workflow was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the workflow was last updated. - google.protobuf.Timestamp last_update_time = 5; + // Output only. Time when the workflow was last updated. + google.protobuf.Timestamp last_update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A single task for a migration which has details about the configuration of @@ -109,7 +112,7 @@ message MigrationTask { // The task is running, i.e. its subtasks are ready for execution. RUNNING = 3; - // Tha task is paused. Assigned subtasks can continue, but no new subtasks + // The task is paused. Assigned subtasks can continue, but no new subtasks // will be scheduled. PAUSED = 4; @@ -122,6 +125,9 @@ message MigrationTask { // The details of the task. oneof task_details { + // Task configuration for Assessment. + AssessmentTaskDetails assessment_task_details = 12; + // Task configuration for CW Batch/Offline SQL Translation. TranslationConfigDetails translation_config_details = 14; @@ -136,13 +142,22 @@ message MigrationTask { (google.api.field_behavior) = IMMUTABLE ]; - // The type of the task. This must be one of the supported task types: - // Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - // Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - // Translation_Snowflake2BQ, Translation_Netezza2BQ, - // Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - // Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - // Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + // The type of the task. This must be one of the supported task types. + // + // Assessment: + // + // - `Assessment_Hive` - Assessment for Hive. + // - `Assessment_Redshift` - Assessment for Redshift. + // - `Assessment_Snowflake` - Assessment for Snowflake. + // - `Assessment_Teradata_v2` - Assessment for Teradata. + // - `Assessment_Oracle` - Assessment for Oracle. + // - `Assessment_Hadoop` - Assessment for Hadoop. + // - `Assessment_Informatica` - Assessment for Informatica. + // + // Translation: + // See [Supported Task + // Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + // for a list of supported task types. string type = 2; // Output only. The current state of the task. @@ -153,11 +168,13 @@ message MigrationTask { google.rpc.ErrorInfo processing_error = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the task was created. - google.protobuf.Timestamp create_time = 6; + // Output only. Time when the task was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the task was last updated. - google.protobuf.Timestamp last_update_time = 7; + // Output only. Time when the task was last updated. + google.protobuf.Timestamp last_update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Provides details to errors and issues encountered while // processing the task. Presence of error details does not mean that the task @@ -165,24 +182,28 @@ message MigrationTask { repeated ResourceErrorDetail resource_error_details = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number or resources with errors. Note: This is not the total - // number of errors as each resource can have more than one error. - // This is used to indicate truncation by having a `resource_error_count` - // that is higher than the size of `resource_error_details`. - int32 resource_error_count = 18; + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The metrics for the task. - repeated TimeSeries metrics = 19; + // Output only. The metrics for the task. + repeated TimeSeries metrics = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The result of the task. MigrationTaskResult task_result = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Count of all the processing errors in this task and its subtasks. - int32 total_processing_error_count = 21; + // Output only. Count of all the processing errors in this task and its + // subtasks. + int32 total_processing_error_count = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Count of all the resource errors in this task and its subtasks. - int32 total_resource_error_count = 22; + // Output only. Count of all the resource errors in this task and its + // subtasks. + int32 total_resource_error_count = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A subtask for a migration which carries details about the configuration of @@ -252,20 +273,22 @@ message MigrationSubtask { repeated ResourceErrorDetail resource_error_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number or resources with errors. Note: This is not the total - // number of errors as each resource can have more than one error. - // This is used to indicate truncation by having a `resource_error_count` - // that is higher than the size of `resource_error_details`. - int32 resource_error_count = 13; + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the subtask was created. - google.protobuf.Timestamp create_time = 7; + // Output only. Time when the subtask was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the subtask was last updated. - google.protobuf.Timestamp last_update_time = 8; + // Output only. Time when the subtask was last updated. + google.protobuf.Timestamp last_update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // The metrics for the subtask. - repeated TimeSeries metrics = 11; + // Output only. The metrics for the subtask. + repeated TimeSeries metrics = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The migration task result. @@ -284,4 +307,7 @@ message TranslationTaskResult { // The records from the aggregate CSV report for a migration workflow. repeated GcsReportLogMessage report_log_messages = 2; + + // The Cloud Console URI for the migration workflow. + string console_uri = 3; } diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto index b40ad642427a..4f7db8c68a06 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto index a2cb52a2ecc9..50b6e9b53632 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto index fa696fa8adbf..53032afd5780 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto index c6cf897a0b30..82bbfb9b38e8 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto index 37e5ae3ba1aa..5737556cda17 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -47,6 +47,48 @@ message TranslationDetails { // targets will be generated. Some additional target types may be slower to // generate. See the documentation for the set of available target types. repeated string target_types = 5; + + // The configuration for the suggestion if requested as a target type. + SuggestionConfig suggestion_config = 6; +} + +// The configuration for the suggestion if requested as a target type. +message SuggestionConfig { + // The list of suggestion steps to skip. + repeated SuggestionStep skip_suggestion_steps = 1; +} + +// Suggestion step to skip. +message SuggestionStep { + // Suggestion type. + enum SuggestionType { + // Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0; + + // Query customization. + QUERY_CUSTOMIZATION = 1; + + // Translation explanation. + TRANSLATION_EXPLANATION = 2; + } + + // The target to apply the suggestion to. + enum RewriteTarget { + // Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0; + + // Source SQL. + SOURCE_SQL = 1; + + // Target SQL. + TARGET_SQL = 2; + } + + // The type of suggestion. + SuggestionType suggestion_type = 1; + + // The rewrite target. + RewriteTarget rewrite_target = 2; } // Represents one mapping from a source SQL to a target SQL. @@ -67,6 +109,9 @@ message SourceSpec { // Source literal. Literal literal = 2; + + // The path to a single source file in Cloud Storage. + string gcs_file_path = 4; } // Optional. The optional field to specify the encoding of the sql bytes. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto index 012ee00fffcb..944a687f64de 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/protos.d.ts b/packages/google-cloud-bigquery-migration/protos/protos.d.ts index 71305b1bd2bb..4d0e9970c82e 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-migration/protos/protos.d.ts @@ -29,6 +29,224 @@ export namespace google { /** Namespace v2. */ namespace v2 { + /** Properties of an AssessmentTaskDetails. */ + interface IAssessmentTaskDetails { + + /** AssessmentTaskDetails inputPath */ + inputPath?: (string|null); + + /** AssessmentTaskDetails outputDataset */ + outputDataset?: (string|null); + + /** AssessmentTaskDetails querylogsPath */ + querylogsPath?: (string|null); + + /** AssessmentTaskDetails dataSource */ + dataSource?: (string|null); + + /** AssessmentTaskDetails featureHandle */ + featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + } + + /** Represents an AssessmentTaskDetails. */ + class AssessmentTaskDetails implements IAssessmentTaskDetails { + + /** + * Constructs a new AssessmentTaskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails); + + /** AssessmentTaskDetails inputPath. */ + public inputPath: string; + + /** AssessmentTaskDetails outputDataset. */ + public outputDataset: string; + + /** AssessmentTaskDetails querylogsPath. */ + public querylogsPath: string; + + /** AssessmentTaskDetails dataSource. */ + public dataSource: string; + + /** AssessmentTaskDetails featureHandle. */ + public featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentTaskDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Verifies an AssessmentTaskDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentTaskDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @param message AssessmentTaskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AssessmentFeatureHandle. */ + interface IAssessmentFeatureHandle { + + /** AssessmentFeatureHandle addShareableDataset */ + addShareableDataset?: (boolean|null); + } + + /** Represents an AssessmentFeatureHandle. */ + class AssessmentFeatureHandle implements IAssessmentFeatureHandle { + + /** + * Constructs a new AssessmentFeatureHandle. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle); + + /** AssessmentFeatureHandle addShareableDataset. */ + public addShareableDataset?: (boolean|null); + + /** + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentFeatureHandle instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Verifies an AssessmentFeatureHandle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentFeatureHandle + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @param message AssessmentFeatureHandle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentFeatureHandle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentFeatureHandle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentFeatureHandle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MigrationWorkflow. */ interface IMigrationWorkflow { @@ -171,6 +389,9 @@ export namespace google { /** Properties of a MigrationTask. */ interface IMigrationTask { + /** MigrationTask assessmentTaskDetails */ + assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + /** MigrationTask translationConfigDetails */ translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); @@ -223,6 +444,9 @@ export namespace google { */ constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationTask); + /** MigrationTask assessmentTaskDetails. */ + public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + /** MigrationTask translationConfigDetails. */ public translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); @@ -266,7 +490,7 @@ export namespace google { public totalResourceErrorCount: number; /** MigrationTask taskDetails. */ - public taskDetails?: ("translationConfigDetails"|"translationDetails"); + public taskDetails?: ("assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"); /** * Creates a new MigrationTask instance using the specified properties. @@ -633,6 +857,9 @@ export namespace google { /** TranslationTaskResult reportLogMessages */ reportLogMessages?: (google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]|null); + + /** TranslationTaskResult consoleUri */ + consoleUri?: (string|null); } /** Represents a TranslationTaskResult. */ @@ -650,6 +877,9 @@ export namespace google { /** TranslationTaskResult reportLogMessages. */ public reportLogMessages: google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]; + /** TranslationTaskResult consoleUri. */ + public consoleUri: string; + /** * Creates a new TranslationTaskResult instance using the specified properties. * @param [properties] Properties to set @@ -3972,6 +4202,9 @@ export namespace google { /** TranslationDetails targetTypes */ targetTypes?: (string[]|null); + + /** TranslationDetails suggestionConfig */ + suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); } /** Represents a TranslationDetails. */ @@ -3998,6 +4231,9 @@ export namespace google { /** TranslationDetails targetTypes. */ public targetTypes: string[]; + /** TranslationDetails suggestionConfig. */ + public suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); + /** * Creates a new TranslationDetails instance using the specified properties. * @param [properties] Properties to set @@ -4076,6 +4312,223 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SuggestionConfig. */ + interface ISuggestionConfig { + + /** SuggestionConfig skipSuggestionSteps */ + skipSuggestionSteps?: (google.cloud.bigquery.migration.v2.ISuggestionStep[]|null); + } + + /** Represents a SuggestionConfig. */ + class SuggestionConfig implements ISuggestionConfig { + + /** + * Constructs a new SuggestionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig); + + /** SuggestionConfig skipSuggestionSteps. */ + public skipSuggestionSteps: google.cloud.bigquery.migration.v2.ISuggestionStep[]; + + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionConfig instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Verifies a SuggestionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @param message SuggestionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SuggestionStep. */ + interface ISuggestionStep { + + /** SuggestionStep suggestionType */ + suggestionType?: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null); + + /** SuggestionStep rewriteTarget */ + rewriteTarget?: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null); + } + + /** Represents a SuggestionStep. */ + class SuggestionStep implements ISuggestionStep { + + /** + * Constructs a new SuggestionStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep); + + /** SuggestionStep suggestionType. */ + public suggestionType: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType); + + /** SuggestionStep rewriteTarget. */ + public rewriteTarget: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget); + + /** + * Creates a new SuggestionStep instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionStep instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Verifies a SuggestionStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. + * @param message SuggestionStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SuggestionStep { + + /** SuggestionType enum. */ + enum SuggestionType { + SUGGESTION_TYPE_UNSPECIFIED = 0, + QUERY_CUSTOMIZATION = 1, + TRANSLATION_EXPLANATION = 2 + } + + /** RewriteTarget enum. */ + enum RewriteTarget { + REWRITE_TARGET_UNSPECIFIED = 0, + SOURCE_SQL = 1, + TARGET_SQL = 2 + } + } + /** Properties of a SourceTargetMapping. */ interface ISourceTargetMapping { @@ -4188,6 +4641,9 @@ export namespace google { /** SourceSpec literal */ literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + /** SourceSpec gcsFilePath */ + gcsFilePath?: (string|null); + /** SourceSpec encoding */ encoding?: (string|null); } @@ -4207,11 +4663,14 @@ export namespace google { /** SourceSpec literal. */ public literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + /** SourceSpec gcsFilePath. */ + public gcsFilePath?: (string|null); + /** SourceSpec encoding. */ public encoding: string; /** SourceSpec source. */ - public source?: ("baseUri"|"literal"); + public source?: ("baseUri"|"literal"|"gcsFilePath"); /** * Creates a new SourceSpec instance using the specified properties. diff --git a/packages/google-cloud-bigquery-migration/protos/protos.js b/packages/google-cloud-bigquery-migration/protos/protos.js index 5cfe26d1ff19..2a2bf8e377b6 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.js +++ b/packages/google-cloud-bigquery-migration/protos/protos.js @@ -75,30 +75,28 @@ */ var v2 = {}; - v2.MigrationWorkflow = (function() { + v2.AssessmentTaskDetails = (function() { /** - * Properties of a MigrationWorkflow. + * Properties of an AssessmentTaskDetails. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationWorkflow - * @property {string|null} [name] MigrationWorkflow name - * @property {string|null} [displayName] MigrationWorkflow displayName - * @property {Object.|null} [tasks] MigrationWorkflow tasks - * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + * @interface IAssessmentTaskDetails + * @property {string|null} [inputPath] AssessmentTaskDetails inputPath + * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset + * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath + * @property {string|null} [dataSource] AssessmentTaskDetails dataSource + * @property {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null} [featureHandle] AssessmentTaskDetails featureHandle */ /** - * Constructs a new MigrationWorkflow. + * Constructs a new AssessmentTaskDetails. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationWorkflow. - * @implements IMigrationWorkflow + * @classdesc Represents an AssessmentTaskDetails. + * @implements IAssessmentTaskDetails * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set */ - function MigrationWorkflow(properties) { - this.tasks = {}; + function AssessmentTaskDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106,169 +104,142 @@ } /** - * MigrationWorkflow name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.name = ""; + AssessmentTaskDetails.prototype.inputPath = ""; /** - * MigrationWorkflow displayName. - * @member {string} displayName - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails outputDataset. + * @member {string} outputDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.displayName = ""; + AssessmentTaskDetails.prototype.outputDataset = ""; /** - * MigrationWorkflow tasks. - * @member {Object.} tasks - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails querylogsPath. + * @member {string} querylogsPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.tasks = $util.emptyObject; + AssessmentTaskDetails.prototype.querylogsPath = ""; /** - * MigrationWorkflow state. - * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails dataSource. + * @member {string} dataSource + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.state = 0; + AssessmentTaskDetails.prototype.dataSource = ""; /** - * MigrationWorkflow createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails featureHandle. + * @member {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null|undefined} featureHandle + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.createTime = null; + AssessmentTaskDetails.prototype.featureHandle = null; - /** - * MigrationWorkflow lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.lastUpdateTime = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentTaskDetails.prototype, "_featureHandle", { + get: $util.oneOfGetter($oneOfFields = ["featureHandle"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MigrationWorkflow instance using the specified properties. + * Creates a new AssessmentTaskDetails instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails instance */ - MigrationWorkflow.create = function create(properties) { - return new MigrationWorkflow(properties); + AssessmentTaskDetails.create = function create(properties) { + return new AssessmentTaskDetails(properties); }; /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationWorkflow.encode = function encode(message, writer) { + AssessmentTaskDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) - for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); + if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); + if (message.featureHandle != null && Object.hasOwnProperty.call(message, "featureHandle")) + $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.encode(message.featureHandle, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { + AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationWorkflow.decode = function decode(reader, length, error) { + AssessmentTaskDetails.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); + message.inputPath = reader.string(); break; } case 2: { - if (message.tasks === $util.emptyObject) - message.tasks = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tasks[key] = value; + message.outputDataset = reader.string(); break; } case 3: { - message.state = reader.int32(); + message.querylogsPath = reader.string(); break; } case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.dataSource = reader.string(); break; } - case 5: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 6: { + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.decode(reader, reader.uint32()); break; } default: @@ -280,262 +251,166 @@ }; /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { + AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationWorkflow message. + * Verifies an AssessmentTaskDetails message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationWorkflow.verify = function verify(message) { + AssessmentTaskDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!$util.isObject(message.tasks)) - return "tasks: object expected"; - var key = Object.keys(message.tasks); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); + var properties = {}; + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + if (!$util.isString(message.outputDataset)) + return "outputDataset: string expected"; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + if (!$util.isString(message.querylogsPath)) + return "querylogsPath: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + properties._featureHandle = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify(message.featureHandle); if (error) - return "tasks." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + return "featureHandle." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; } return null; }; /** - * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails */ - MigrationWorkflow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) + AssessmentTaskDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.tasks) { - if (typeof object.tasks !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks = {}; - for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { - if (typeof object.tasks[keys[i]] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "COMPLETED": - case 4: - message.state = 4; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputDataset != null) + message.outputDataset = String(object.outputDataset); + if (object.querylogsPath != null) + message.querylogsPath = String(object.querylogsPath); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.featureHandle != null) { + if (typeof object.featureHandle !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.AssessmentTaskDetails.featureHandle: object expected"); + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.fromObject(object.featureHandle); } return message; }; /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow + * @param {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} message AssessmentTaskDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationWorkflow.toObject = function toObject(message, options) { + AssessmentTaskDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.tasks = {}; if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.lastUpdateTime = null; - object.displayName = ""; + object.inputPath = ""; + object.outputDataset = ""; + object.querylogsPath = ""; + object.dataSource = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { - object.tasks = {}; - for (var j = 0; j < keys2.length; ++j) - object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + object.outputDataset = message.outputDataset; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + object.querylogsPath = message.querylogsPath; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + object.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.toObject(message.featureHandle, options); + if (options.oneofs) + object._featureHandle = "featureHandle"; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this MigrationWorkflow to JSON. + * Converts this AssessmentTaskDetails to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance * @returns {Object.} JSON object */ - MigrationWorkflow.prototype.toJSON = function toJSON() { + AssessmentTaskDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationWorkflow + * Gets the default type url for AssessmentTaskDetails * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentTaskDetails"; }; - /** - * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} COMPLETED=4 COMPLETED value - */ - MigrationWorkflow.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "COMPLETED"] = 4; - return values; - })(); - - return MigrationWorkflow; + return AssessmentTaskDetails; })(); - v2.MigrationTask = (function() { + v2.AssessmentFeatureHandle = (function() { /** - * Properties of a MigrationTask. + * Properties of an AssessmentFeatureHandle. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTask - * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails - * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails - * @property {string|null} [id] MigrationTask id - * @property {string|null} [type] MigrationTask type - * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime - * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount - * @property {Array.|null} [metrics] MigrationTask metrics - * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult - * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount - * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount + * @interface IAssessmentFeatureHandle + * @property {boolean|null} [addShareableDataset] AssessmentFeatureHandle addShareableDataset */ /** - * Constructs a new MigrationTask. + * Constructs a new AssessmentFeatureHandle. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTask. - * @implements IMigrationTask + * @classdesc Represents an AssessmentFeatureHandle. + * @implements IAssessmentFeatureHandle * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set */ - function MigrationTask(properties) { - this.resourceErrorDetails = []; - this.metrics = []; + function AssessmentFeatureHandle(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -543,281 +418,395 @@ } /** - * MigrationTask translationConfigDetails. - * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * AssessmentFeatureHandle addShareableDataset. + * @member {boolean|null|undefined} addShareableDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle * @instance */ - MigrationTask.prototype.translationConfigDetails = null; + AssessmentFeatureHandle.prototype.addShareableDataset = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentFeatureHandle.prototype, "_addShareableDataset", { + get: $util.oneOfGetter($oneOfFields = ["addShareableDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * MigrationTask translationDetails. - * @member {google.cloud.bigquery.migration.v2.ITranslationDetails|null|undefined} translationDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle instance */ - MigrationTask.prototype.translationDetails = null; + AssessmentFeatureHandle.create = function create(properties) { + return new AssessmentFeatureHandle(properties); + }; /** - * MigrationTask id. - * @member {string} id - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationTask.prototype.id = ""; + AssessmentFeatureHandle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addShareableDataset != null && Object.hasOwnProperty.call(message, "addShareableDataset")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.addShareableDataset); + return writer; + }; /** - * MigrationTask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationTask.prototype.type = ""; + AssessmentFeatureHandle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MigrationTask state. - * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.prototype.state = 0; + AssessmentFeatureHandle.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.addShareableDataset = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MigrationTask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.prototype.processingError = null; + AssessmentFeatureHandle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * MigrationTask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Verifies an AssessmentFeatureHandle message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTask.prototype.createTime = null; + AssessmentFeatureHandle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + properties._addShareableDataset = 1; + if (typeof message.addShareableDataset !== "boolean") + return "addShareableDataset: boolean expected"; + } + return null; + }; /** - * MigrationTask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle */ - MigrationTask.prototype.lastUpdateTime = null; + AssessmentFeatureHandle.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + if (object.addShareableDataset != null) + message.addShareableDataset = Boolean(object.addShareableDataset); + return message; + }; /** - * MigrationTask resourceErrorDetails. - * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} message AssessmentFeatureHandle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MigrationTask.prototype.resourceErrorDetails = $util.emptyArray; + AssessmentFeatureHandle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + object.addShareableDataset = message.addShareableDataset; + if (options.oneofs) + object._addShareableDataset = "addShareableDataset"; + } + return object; + }; /** - * MigrationTask resourceErrorCount. - * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * Converts this AssessmentFeatureHandle to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle * @instance + * @returns {Object.} JSON object */ - MigrationTask.prototype.resourceErrorCount = 0; + AssessmentFeatureHandle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * MigrationTask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * Gets the default type url for AssessmentFeatureHandle + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentFeatureHandle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentFeatureHandle"; + }; + + return AssessmentFeatureHandle; + })(); + + v2.MigrationWorkflow = (function() { + + /** + * Properties of a MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationWorkflow + * @property {string|null} [name] MigrationWorkflow name + * @property {string|null} [displayName] MigrationWorkflow displayName + * @property {Object.|null} [tasks] MigrationWorkflow tasks + * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + */ + + /** + * Constructs a new MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationWorkflow. + * @implements IMigrationWorkflow + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + */ + function MigrationWorkflow(properties) { + this.tasks = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationWorkflow name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.metrics = $util.emptyArray; + MigrationWorkflow.prototype.name = ""; /** - * MigrationTask taskResult. - * @member {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null|undefined} taskResult - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.taskResult = null; + MigrationWorkflow.prototype.displayName = ""; /** - * MigrationTask totalProcessingErrorCount. - * @member {number} totalProcessingErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow tasks. + * @member {Object.} tasks + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.totalProcessingErrorCount = 0; + MigrationWorkflow.prototype.tasks = $util.emptyObject; /** - * MigrationTask totalResourceErrorCount. - * @member {number} totalResourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow state. + * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.totalResourceErrorCount = 0; + MigrationWorkflow.prototype.state = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MigrationWorkflow createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.createTime = null; /** - * MigrationTask taskDetails. - * @member {"translationConfigDetails"|"translationDetails"|undefined} taskDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - Object.defineProperty(MigrationTask.prototype, "taskDetails", { - get: $util.oneOfGetter($oneOfFields = ["translationConfigDetails", "translationDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); + MigrationWorkflow.prototype.lastUpdateTime = null; /** - * Creates a new MigrationTask instance using the specified properties. + * Creates a new MigrationWorkflow instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance */ - MigrationTask.create = function create(properties) { - return new MigrationTask(properties); + MigrationWorkflow.create = function create(properties) { + return new MigrationWorkflow(properties); }; /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTask.encode = function encode(message, writer) { + MigrationWorkflow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) + for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) - for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 18, wireType 0 =*/144).int32(message.resourceErrorCount); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.taskResult != null && Object.hasOwnProperty.call(message, "taskResult")) - $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.encode(message.taskResult, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.totalProcessingErrorCount != null && Object.hasOwnProperty.call(message, "totalProcessingErrorCount")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.totalProcessingErrorCount); - if (message.totalResourceErrorCount != null && Object.hasOwnProperty.call(message, "totalResourceErrorCount")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.totalResourceErrorCount); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); return writer; }; /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { + MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationTask message from the specified reader or buffer. + * Decodes a MigrationWorkflow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.decode = function decode(reader, length, error) { + MigrationWorkflow.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 14: { - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); - break; - } - case 16: { - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } - case 1: { - message.id = reader.string(); + case 6: { + message.displayName = reader.string(); break; } case 2: { - message.type = reader.string(); + if (message.tasks === $util.emptyObject) + message.tasks = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tasks[key] = value; break; } - case 4: { + case 3: { message.state = reader.int32(); break; } - case 5: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 6: { + case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 7: { + case 5: { message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 17: { - if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) - message.resourceErrorDetails = []; - message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); - break; - } - case 18: { - message.resourceErrorCount = reader.int32(); - break; - } - case 19: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); - break; - } - case 20: { - message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.decode(reader, reader.uint32()); - break; - } - case 21: { - message.totalProcessingErrorCount = reader.int32(); - break; - } - case 22: { - message.totalResourceErrorCount = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -827,57 +816,48 @@ }; /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.decodeDelimited = function decodeDelimited(reader) { + MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationTask message. + * Verifies a MigrationWorkflow message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTask.verify = function verify(message) { + MigrationWorkflow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); - if (error) - return "translationConfigDetails." + error; - } - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - if (properties.taskDetails === 1) - return "taskDetails: multiple values"; - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!$util.isObject(message.tasks)) + return "tasks: object expected"; + var key = Object.keys(message.tasks); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); if (error) - return "translationDetails." + error; + return "tasks." + error; } } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -887,15 +867,8 @@ case 2: case 3: case 4: - case 5: - case 6: break; } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -906,67 +879,35 @@ if (error) return "lastUpdateTime." + error; } - if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { - if (!Array.isArray(message.resourceErrorDetails)) - return "resourceErrorDetails: array expected"; - for (var i = 0; i < message.resourceErrorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); - if (error) - return "resourceErrorDetails." + error; - } - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - if (!$util.isInteger(message.resourceErrorCount)) - return "resourceErrorCount: integer expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.taskResult != null && message.hasOwnProperty("taskResult")) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); - if (error) - return "taskResult." + error; - } - if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) - if (!$util.isInteger(message.totalProcessingErrorCount)) - return "totalProcessingErrorCount: integer expected"; - if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) - if (!$util.isInteger(message.totalResourceErrorCount)) - return "totalResourceErrorCount: integer expected"; return null; }; /** - * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow */ - MigrationTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) + MigrationWorkflow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); - if (object.translationConfigDetails != null) { - if (typeof object.translationConfigDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); - } - if (object.translationDetails != null) { - if (typeof object.translationDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.tasks) { + if (typeof object.tasks !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks = {}; + for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { + if (typeof object.tasks[keys[i]] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); + } } - if (object.id != null) - message.id = String(object.id); - if (object.type != null) - message.type = String(object.type); switch (object.state) { default: if (typeof object.state === "number") { @@ -978,232 +919,158 @@ case 0: message.state = 0; break; - case "PENDING": + case "DRAFT": case 1: message.state = 1; break; - case "ORCHESTRATING": + case "RUNNING": case 2: message.state = 2; break; - case "RUNNING": + case "PAUSED": case 3: message.state = 3; break; - case "PAUSED": + case "COMPLETED": case 4: message.state = 4; break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.lastUpdateTime != null) { if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); } - if (object.resourceErrorDetails) { - if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); - message.resourceErrorDetails = []; - for (var i = 0; i < object.resourceErrorDetails.length; ++i) { - if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); - message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); - } - } - if (object.resourceErrorCount != null) - message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); - message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); - } - } - if (object.taskResult != null) { - if (typeof object.taskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); - message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); - } - if (object.totalProcessingErrorCount != null) - message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; - if (object.totalResourceErrorCount != null) - message.totalResourceErrorCount = object.totalResourceErrorCount | 0; return message; }; /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationTask.toObject = function toObject(message, options) { + MigrationWorkflow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.resourceErrorDetails = []; - object.metrics = []; - } + if (options.objects || options.defaults) + object.tasks = {}; if (options.defaults) { - object.id = ""; - object.type = ""; + object.name = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; object.createTime = null; object.lastUpdateTime = null; - object.resourceErrorCount = 0; - object.taskResult = null; - object.totalProcessingErrorCount = 0; - object.totalResourceErrorCount = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { + object.tasks = {}; + for (var j = 0; j < keys2.length; ++j) + object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); - if (options.oneofs) - object.taskDetails = "translationConfigDetails"; - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); - if (options.oneofs) - object.taskDetails = "translationDetails"; - } - if (message.resourceErrorDetails && message.resourceErrorDetails.length) { - object.resourceErrorDetails = []; - for (var j = 0; j < message.resourceErrorDetails.length; ++j) - object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - object.resourceErrorCount = message.resourceErrorCount; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); - } - if (message.taskResult != null && message.hasOwnProperty("taskResult")) - object.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.toObject(message.taskResult, options); - if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) - object.totalProcessingErrorCount = message.totalProcessingErrorCount; - if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) - object.totalResourceErrorCount = message.totalResourceErrorCount; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this MigrationTask to JSON. + * Converts this MigrationWorkflow to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance * @returns {Object.} JSON object */ - MigrationTask.prototype.toJSON = function toJSON() { + MigrationWorkflow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationTask + * Gets the default type url for MigrationWorkflow * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; }; /** * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationTask.State + * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} ORCHESTRATING=2 ORCHESTRATING value - * @property {number} RUNNING=3 RUNNING value - * @property {number} PAUSED=4 PAUSED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} COMPLETED=4 COMPLETED value */ - MigrationTask.State = (function() { + MigrationWorkflow.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "ORCHESTRATING"] = 2; - values[valuesById[3] = "RUNNING"] = 3; - values[valuesById[4] = "PAUSED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "COMPLETED"] = 4; return values; })(); - return MigrationTask; + return MigrationWorkflow; })(); - v2.MigrationSubtask = (function() { + v2.MigrationTask = (function() { /** - * Properties of a MigrationSubtask. + * Properties of a MigrationTask. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationSubtask - * @property {string|null} [name] MigrationSubtask name - * @property {string|null} [taskId] MigrationSubtask taskId - * @property {string|null} [type] MigrationSubtask type - * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError - * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime - * @property {Array.|null} [metrics] MigrationSubtask metrics + * @interface IMigrationTask + * @property {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails + * @property {string|null} [id] MigrationTask id + * @property {string|null} [type] MigrationTask type + * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime + * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount + * @property {Array.|null} [metrics] MigrationTask metrics + * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult + * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount + * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount */ /** - * Constructs a new MigrationSubtask. + * Constructs a new MigrationTask. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationSubtask. - * @implements IMigrationSubtask + * @classdesc Represents a MigrationTask. + * @implements IMigrationTask * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set */ - function MigrationSubtask(properties) { + function MigrationTask(properties) { this.resourceErrorDetails = []; this.metrics = []; if (properties) @@ -1213,209 +1080,293 @@ } /** - * MigrationSubtask name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask assessmentTaskDetails. + * @member {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.name = ""; + MigrationTask.prototype.assessmentTaskDetails = null; /** - * MigrationSubtask taskId. - * @member {string} taskId - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask translationConfigDetails. + * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.taskId = ""; + MigrationTask.prototype.translationConfigDetails = null; /** - * MigrationSubtask type. + * MigrationTask translationDetails. + * @member {google.cloud.bigquery.migration.v2.ITranslationDetails|null|undefined} translationDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.translationDetails = null; + + /** + * MigrationTask id. + * @member {string} id + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.id = ""; + + /** + * MigrationTask type. * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.type = ""; + MigrationTask.prototype.type = ""; /** - * MigrationSubtask state. - * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask state. + * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.state = 0; + MigrationTask.prototype.state = 0; /** - * MigrationSubtask processingError. + * MigrationTask processingError. * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.processingError = null; + MigrationTask.prototype.processingError = null; /** - * MigrationSubtask resourceErrorDetails. + * MigrationTask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.createTime = null; + + /** + * MigrationTask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.lastUpdateTime = null; + + /** + * MigrationTask resourceErrorDetails. * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + MigrationTask.prototype.resourceErrorDetails = $util.emptyArray; /** - * MigrationSubtask resourceErrorCount. + * MigrationTask resourceErrorCount. * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.resourceErrorCount = 0; + MigrationTask.prototype.resourceErrorCount = 0; /** - * MigrationSubtask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.createTime = null; + MigrationTask.prototype.metrics = $util.emptyArray; /** - * MigrationSubtask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask taskResult. + * @member {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null|undefined} taskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.lastUpdateTime = null; + MigrationTask.prototype.taskResult = null; /** - * MigrationSubtask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask totalProcessingErrorCount. + * @member {number} totalProcessingErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.metrics = $util.emptyArray; + MigrationTask.prototype.totalProcessingErrorCount = 0; /** - * Creates a new MigrationSubtask instance using the specified properties. + * MigrationTask totalResourceErrorCount. + * @member {number} totalResourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.totalResourceErrorCount = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationTask taskDetails. + * @member {"assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"|undefined} taskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + Object.defineProperty(MigrationTask.prototype, "taskDetails", { + get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationConfigDetails", "translationDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTask instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance + * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance */ - MigrationSubtask.create = function create(properties) { - return new MigrationSubtask(properties); + MigrationTask.create = function create(properties) { + return new MigrationTask(properties); }; /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationSubtask.encode = function encode(message, writer) { + MigrationTask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) + $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.resourceErrorCount); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.taskResult != null && Object.hasOwnProperty.call(message, "taskResult")) + $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.encode(message.taskResult, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.totalProcessingErrorCount != null && Object.hasOwnProperty.call(message, "totalProcessingErrorCount")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.totalProcessingErrorCount); + if (message.totalResourceErrorCount != null && Object.hasOwnProperty.call(message, "totalResourceErrorCount")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.totalResourceErrorCount); return writer; }; /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { + MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationSubtask message from the specified reader or buffer. + * Decodes a MigrationTask message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationSubtask.decode = function decode(reader, length, error) { + MigrationTask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 12: { + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); + break; + } + case 16: { + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); + break; + } case 1: { - message.name = reader.string(); + message.id = reader.string(); break; } case 2: { - message.taskId = reader.string(); + message.type = reader.string(); break; } - case 3: { - message.type = reader.string(); + case 4: { + message.state = reader.int32(); break; } case 5: { - message.state = reader.int32(); + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); break; } case 6: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 12: { + case 7: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) message.resourceErrorDetails = []; message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); break; } - case 13: { + case 18: { message.resourceErrorCount = reader.int32(); break; } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 19: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); break; } - case 8: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 20: { + message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.decode(reader, reader.uint32()); break; } - case 11: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); + case 21: { + message.totalProcessingErrorCount = reader.int32(); + break; + } + case 22: { + message.totalResourceErrorCount = reader.int32(); break; } default: @@ -1427,38 +1378,64 @@ }; /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + MigrationTask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationSubtask message. + * Verifies a MigrationTask message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationSubtask.verify = function verify(message) { + MigrationTask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; + var properties = {}; + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify(message.assessmentTaskDetails); + if (error) + return "assessmentTaskDetails." + error; + } + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); + if (error) + return "translationConfigDetails." + error; + } + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); + if (error) + return "translationDetails." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; @@ -1480,6 +1457,16 @@ if (error) return "processingError." + error; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { if (!Array.isArray(message.resourceErrorDetails)) return "resourceErrorDetails: array expected"; @@ -1492,16 +1479,6 @@ if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) if (!$util.isInteger(message.resourceErrorCount)) return "resourceErrorCount: integer expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } if (message.metrics != null && message.hasOwnProperty("metrics")) { if (!Array.isArray(message.metrics)) return "metrics: array expected"; @@ -1511,25 +1488,49 @@ return "metrics." + error; } } + if (message.taskResult != null && message.hasOwnProperty("taskResult")) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); + if (error) + return "taskResult." + error; + } + if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) + if (!$util.isInteger(message.totalProcessingErrorCount)) + return "totalProcessingErrorCount: integer expected"; + if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) + if (!$util.isInteger(message.totalResourceErrorCount)) + return "totalResourceErrorCount: integer expected"; return null; }; /** - * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask */ - MigrationSubtask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) + MigrationTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); - if (object.name != null) - message.name = String(object.name); - if (object.taskId != null) - message.taskId = String(object.taskId); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + if (object.assessmentTaskDetails != null) { + if (typeof object.assessmentTaskDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.assessmentTaskDetails: object expected"); + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); + } + if (object.translationConfigDetails != null) { + if (typeof object.translationConfigDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); + } + if (object.translationDetails != null) { + if (typeof object.translationDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); + } + if (object.id != null) + message.id = String(object.id); if (object.type != null) message.type = String(object.type); switch (object.state) { @@ -1543,116 +1544,135 @@ case 0: message.state = 0; break; - case "ACTIVE": + case "PENDING": case 1: message.state = 1; break; - case "RUNNING": + case "ORCHESTRATING": case 2: message.state = 2; break; - case "SUCCEEDED": + case "RUNNING": case 3: message.state = 3; break; - case "FAILED": + case "PAUSED": case 4: message.state = 4; break; - case "PAUSED": + case "SUCCEEDED": case 5: message.state = 5; break; - case "PENDING_DEPENDENCY": + case "FAILED": case 6: message.state = 6; break; } if (object.processingError != null) { if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } if (object.resourceErrorDetails) { if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); message.resourceErrorDetails = []; for (var i = 0; i < object.resourceErrorDetails.length; ++i) { if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); } } if (object.resourceErrorCount != null) message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } if (object.metrics) { if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); message.metrics = []; for (var i = 0; i < object.metrics.length; ++i) { if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); } } + if (object.taskResult != null) { + if (typeof object.taskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); + message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); + } + if (object.totalProcessingErrorCount != null) + message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; + if (object.totalResourceErrorCount != null) + message.totalResourceErrorCount = object.totalResourceErrorCount | 0; return message; }; /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask + * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationSubtask.toObject = function toObject(message, options) { + MigrationTask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.metrics = []; object.resourceErrorDetails = []; + object.metrics = []; } if (options.defaults) { - object.name = ""; - object.taskId = ""; + object.id = ""; object.type = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.processingError = null; object.createTime = null; object.lastUpdateTime = null; object.resourceErrorCount = 0; + object.taskResult = null; + object.totalProcessingErrorCount = 0; + object.totalResourceErrorCount = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; if (message.processingError != null && message.hasOwnProperty("processingError")) object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); + if (options.oneofs) + object.taskDetails = "assessmentTaskDetails"; + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); + if (options.oneofs) + object.taskDetails = "translationConfigDetails"; + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); + if (options.oneofs) + object.taskDetails = "translationDetails"; } if (message.resourceErrorDetails && message.resourceErrorDetails.length) { object.resourceErrorDetails = []; @@ -1661,80 +1681,102 @@ } if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) object.resourceErrorCount = message.resourceErrorCount; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + } + if (message.taskResult != null && message.hasOwnProperty("taskResult")) + object.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.toObject(message.taskResult, options); + if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) + object.totalProcessingErrorCount = message.totalProcessingErrorCount; + if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) + object.totalResourceErrorCount = message.totalResourceErrorCount; return object; }; /** - * Converts this MigrationSubtask to JSON. + * Converts this MigrationTask to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance * @returns {Object.} JSON object */ - MigrationSubtask.prototype.toJSON = function toJSON() { + MigrationTask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationSubtask + * Gets the default type url for MigrationTask * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; }; /** * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State + * @name google.cloud.bigquery.migration.v2.MigrationTask.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - * @property {number} PAUSED=5 PAUSED value - * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value + * @property {number} PENDING=1 PENDING value + * @property {number} ORCHESTRATING=2 ORCHESTRATING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} PAUSED=4 PAUSED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value */ - MigrationSubtask.State = (function() { + MigrationTask.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "PAUSED"] = 5; - values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "ORCHESTRATING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "PAUSED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; return values; })(); - return MigrationSubtask; + return MigrationTask; })(); - v2.MigrationTaskResult = (function() { + v2.MigrationSubtask = (function() { /** - * Properties of a MigrationTaskResult. + * Properties of a MigrationSubtask. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTaskResult - * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult + * @interface IMigrationSubtask + * @property {string|null} [name] MigrationSubtask name + * @property {string|null} [taskId] MigrationSubtask taskId + * @property {string|null} [type] MigrationSubtask type + * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError + * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime + * @property {Array.|null} [metrics] MigrationSubtask metrics */ /** - * Constructs a new MigrationTaskResult. + * Constructs a new MigrationSubtask. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTaskResult. - * @implements IMigrationTaskResult + * @classdesc Represents a MigrationSubtask. + * @implements IMigrationSubtask * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set */ - function MigrationTaskResult(properties) { + function MigrationSubtask(properties) { + this.resourceErrorDetails = []; + this.metrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1742,231 +1784,528 @@ } /** - * MigrationTaskResult translationTaskResult. - * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * MigrationSubtask name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @instance */ - MigrationTaskResult.prototype.translationTaskResult = null; + MigrationSubtask.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MigrationSubtask taskId. + * @member {string} taskId + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.taskId = ""; /** - * MigrationTaskResult details. - * @member {"translationTaskResult"|undefined} details - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * MigrationSubtask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @instance */ - Object.defineProperty(MigrationTaskResult.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), - set: $util.oneOfSetter($oneOfFields) - }); + MigrationSubtask.prototype.type = ""; /** - * Creates a new MigrationTaskResult instance using the specified properties. + * MigrationSubtask state. + * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.state = 0; + + /** + * MigrationSubtask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.processingError = null; + + /** + * MigrationSubtask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + + /** + * MigrationSubtask resourceErrorCount. + * @member {number} resourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorCount = 0; + + /** + * MigrationSubtask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.createTime = null; + + /** + * MigrationSubtask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.lastUpdateTime = null; + + /** + * MigrationSubtask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.metrics = $util.emptyArray; + + /** + * Creates a new MigrationSubtask instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance */ - MigrationTaskResult.create = function create(properties) { - return new MigrationTaskResult(properties); + MigrationSubtask.create = function create(properties) { + return new MigrationSubtask(properties); }; /** - * Encodes the specified MigrationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTaskResult.encode = function encode(message, writer) { + MigrationSubtask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) - $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) + for (var i = 0; i < message.resourceErrorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); return writer; }; /** - * Encodes the specified MigrationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationTaskResult message from the specified reader or buffer. + * Decodes a MigrationSubtask message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTaskResult.decode = function decode(reader, length, error) { + MigrationSubtask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); + message.taskId = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) + message.resourceErrorDetails = []; + message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); + break; + } + case 13: { + message.resourceErrorCount = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationTaskResult message. + * Verifies a MigrationSubtask message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTaskResult.verify = function verify(message) { + MigrationSubtask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - properties.details = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { + if (!Array.isArray(message.resourceErrorDetails)) + return "resourceErrorDetails: array expected"; + for (var i = 0; i < message.resourceErrorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); if (error) - return "translationTaskResult." + error; + return "resourceErrorDetails." + error; + } + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + if (!$util.isInteger(message.resourceErrorCount)) + return "resourceErrorCount: integer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); + if (error) + return "metrics." + error; } } return null; }; /** - * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask */ - MigrationTaskResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTaskResult) + MigrationSubtask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); - if (object.translationTaskResult != null) { - if (typeof object.translationTaskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + if (object.name != null) + message.name = String(object.name); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.type != null) + message.type = String(object.type); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "PAUSED": + case 5: + message.state = 5; + break; + case "PENDING_DEPENDENCY": + case 6: + message.state = 6; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.resourceErrorDetails) { + if (!Array.isArray(object.resourceErrorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); + message.resourceErrorDetails = []; + for (var i = 0; i < object.resourceErrorDetails.length; ++i) { + if (typeof object.resourceErrorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); + message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); + } + } + if (object.resourceErrorCount != null) + message.resourceErrorCount = object.resourceErrorCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); + message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); + } } return message; }; /** - * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult + * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationTaskResult.toObject = function toObject(message, options) { + MigrationSubtask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); - if (options.oneofs) - object.details = "translationTaskResult"; + if (options.arrays || options.defaults) { + object.metrics = []; + object.resourceErrorDetails = []; } - return object; - }; - - /** - * Converts this MigrationTaskResult to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @instance - * @returns {Object.} JSON object - */ - MigrationTaskResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTaskResult - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { + if (options.defaults) { + object.name = ""; + object.taskId = ""; + object.type = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.resourceErrorCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + } + if (message.resourceErrorDetails && message.resourceErrorDetails.length) { + object.resourceErrorDetails = []; + for (var j = 0; j < message.resourceErrorDetails.length; ++j) + object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + object.resourceErrorCount = message.resourceErrorCount; + return object; + }; + + /** + * Converts this MigrationSubtask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + * @returns {Object.} JSON object + */ + MigrationSubtask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationSubtask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; }; - return MigrationTaskResult; + /** + * State enum. + * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} PAUSED=5 PAUSED value + * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value + */ + MigrationSubtask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "PAUSED"] = 5; + values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; + return values; + })(); + + return MigrationSubtask; })(); - v2.TranslationTaskResult = (function() { + v2.MigrationTaskResult = (function() { /** - * Properties of a TranslationTaskResult. + * Properties of a MigrationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationTaskResult - * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals - * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages + * @interface IMigrationTaskResult + * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult */ /** - * Constructs a new TranslationTaskResult. + * Constructs a new MigrationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationTaskResult. - * @implements ITranslationTaskResult + * @classdesc Represents a MigrationTaskResult. + * @implements IMigrationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set */ - function TranslationTaskResult(properties) { - this.translatedLiterals = []; - this.reportLogMessages = []; + function MigrationTaskResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1974,97 +2313,91 @@ } /** - * TranslationTaskResult translatedLiterals. - * @member {Array.} translatedLiterals - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * MigrationTaskResult translationTaskResult. + * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; + MigrationTaskResult.prototype.translationTaskResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TranslationTaskResult reportLogMessages. - * @member {Array.} reportLogMessages - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * MigrationTaskResult details. + * @member {"translationTaskResult"|undefined} details + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; + Object.defineProperty(MigrationTaskResult.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TranslationTaskResult instance using the specified properties. + * Creates a new MigrationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance */ - TranslationTaskResult.create = function create(properties) { - return new TranslationTaskResult(properties); + MigrationTaskResult.create = function create(properties) { + return new MigrationTaskResult(properties); }; /** - * Encodes the specified TranslationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * Encodes the specified MigrationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationTaskResult.encode = function encode(message, writer) { + MigrationTaskResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.translatedLiterals != null && message.translatedLiterals.length) - for (var i = 0; i < message.translatedLiterals.length; ++i) - $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.reportLogMessages != null && message.reportLogMessages.length) - for (var i = 0; i < message.reportLogMessages.length; ++i) - $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) + $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * Encodes the specified MigrationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationTaskResult message from the specified reader or buffer. + * Decodes a MigrationTaskResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationTaskResult.decode = function decode(reader, length, error) { + MigrationTaskResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.translatedLiterals && message.translatedLiterals.length)) - message.translatedLiterals = []; - message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); - break; - } case 2: { - if (!(message.reportLogMessages && message.reportLogMessages.length)) - message.reportLogMessages = []; - message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); break; } default: @@ -2076,168 +2409,136 @@ }; /** - * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. + * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { + MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationTaskResult message. + * Verifies a MigrationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationTaskResult.verify = function verify(message) { + MigrationTaskResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { - if (!Array.isArray(message.translatedLiterals)) - return "translatedLiterals: array expected"; - for (var i = 0; i < message.translatedLiterals.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); - if (error) - return "translatedLiterals." + error; - } - } - if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { - if (!Array.isArray(message.reportLogMessages)) - return "reportLogMessages: array expected"; - for (var i = 0; i < message.reportLogMessages.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); + var properties = {}; + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + properties.details = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); if (error) - return "reportLogMessages." + error; + return "translationTaskResult." + error; } } return null; }; /** - * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult */ - TranslationTaskResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationTaskResult) + MigrationTaskResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTaskResult) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); - if (object.translatedLiterals) { - if (!Array.isArray(object.translatedLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); - message.translatedLiterals = []; - for (var i = 0; i < object.translatedLiterals.length; ++i) { - if (typeof object.translatedLiterals[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); - message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); - } - } - if (object.reportLogMessages) { - if (!Array.isArray(object.reportLogMessages)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); - message.reportLogMessages = []; - for (var i = 0; i < object.reportLogMessages.length; ++i) { - if (typeof object.reportLogMessages[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); - message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); - } + var message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); + if (object.translationTaskResult != null) { + if (typeof object.translationTaskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); } return message; }; /** - * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. + * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult + * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationTaskResult.toObject = function toObject(message, options) { + MigrationTaskResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.translatedLiterals = []; - object.reportLogMessages = []; - } - if (message.translatedLiterals && message.translatedLiterals.length) { - object.translatedLiterals = []; - for (var j = 0; j < message.translatedLiterals.length; ++j) - object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); - } - if (message.reportLogMessages && message.reportLogMessages.length) { - object.reportLogMessages = []; - for (var j = 0; j < message.reportLogMessages.length; ++j) - object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); + if (options.oneofs) + object.details = "translationTaskResult"; } return object; }; /** - * Converts this TranslationTaskResult to JSON. + * Converts this MigrationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance * @returns {Object.} JSON object */ - TranslationTaskResult.prototype.toJSON = function toJSON() { + MigrationTaskResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TranslationTaskResult + * Gets the default type url for MigrationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; }; - return TranslationTaskResult; + return MigrationTaskResult; })(); - v2.ResourceErrorDetail = (function() { + v2.TranslationTaskResult = (function() { /** - * Properties of a ResourceErrorDetail. + * Properties of a TranslationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @interface IResourceErrorDetail - * @property {google.rpc.IResourceInfo|null} [resourceInfo] ResourceErrorDetail resourceInfo - * @property {Array.|null} [errorDetails] ResourceErrorDetail errorDetails - * @property {number|null} [errorCount] ResourceErrorDetail errorCount + * @interface ITranslationTaskResult + * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals + * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages + * @property {string|null} [consoleUri] TranslationTaskResult consoleUri */ /** - * Constructs a new ResourceErrorDetail. + * Constructs a new TranslationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ResourceErrorDetail. - * @implements IResourceErrorDetail + * @classdesc Represents a TranslationTaskResult. + * @implements ITranslationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set */ - function ResourceErrorDetail(properties) { - this.errorDetails = []; + function TranslationTaskResult(properties) { + this.translatedLiterals = []; + this.reportLogMessages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2245,108 +2546,111 @@ } /** - * ResourceErrorDetail resourceInfo. - * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult translatedLiterals. + * @member {Array.} translatedLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.resourceInfo = null; + TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; /** - * ResourceErrorDetail errorDetails. - * @member {Array.} errorDetails - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult reportLogMessages. + * @member {Array.} reportLogMessages + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; + TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; /** - * ResourceErrorDetail errorCount. - * @member {number} errorCount - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult consoleUri. + * @member {string} consoleUri + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.errorCount = 0; + TranslationTaskResult.prototype.consoleUri = ""; /** - * Creates a new ResourceErrorDetail instance using the specified properties. + * Creates a new TranslationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance */ - ResourceErrorDetail.create = function create(properties) { - return new ResourceErrorDetail(properties); + TranslationTaskResult.create = function create(properties) { + return new TranslationTaskResult(properties); }; /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * Encodes the specified TranslationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceErrorDetail.encode = function encode(message, writer) { + TranslationTaskResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceInfo != null && Object.hasOwnProperty.call(message, "resourceInfo")) - $root.google.rpc.ResourceInfo.encode(message.resourceInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorDetails != null && message.errorDetails.length) - for (var i = 0; i < message.errorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ErrorDetail.encode(message.errorDetails[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.errorCount); + if (message.translatedLiterals != null && message.translatedLiterals.length) + for (var i = 0; i < message.translatedLiterals.length; ++i) + $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reportLogMessages != null && message.reportLogMessages.length) + for (var i = 0; i < message.reportLogMessages.length; ++i) + $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consoleUri != null && Object.hasOwnProperty.call(message, "consoleUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consoleUri); return writer; }; /** - * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * Encodes the specified TranslationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * Decodes a TranslationTaskResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceErrorDetail.decode = function decode(reader, length, error) { + TranslationTaskResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); + if (!(message.translatedLiterals && message.translatedLiterals.length)) + message.translatedLiterals = []; + message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.errorDetails && message.errorDetails.length)) - message.errorDetails = []; - message.errorDetails.push($root.google.cloud.bigquery.migration.v2.ErrorDetail.decode(reader, reader.uint32())); + if (!(message.reportLogMessages && message.reportLogMessages.length)) + message.reportLogMessages = []; + message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); break; } case 3: { - message.errorCount = reader.int32(); + message.consoleUri = reader.string(); break; } default: @@ -2358,163 +2662,177 @@ }; /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceErrorDetail.decodeDelimited = function decodeDelimited(reader) { + TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceErrorDetail message. + * Verifies a TranslationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceErrorDetail.verify = function verify(message) { + TranslationTaskResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) { - var error = $root.google.rpc.ResourceInfo.verify(message.resourceInfo); - if (error) - return "resourceInfo." + error; + if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { + if (!Array.isArray(message.translatedLiterals)) + return "translatedLiterals: array expected"; + for (var i = 0; i < message.translatedLiterals.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); + if (error) + return "translatedLiterals." + error; + } } - if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) { - if (!Array.isArray(message.errorDetails)) - return "errorDetails: array expected"; - for (var i = 0; i < message.errorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ErrorDetail.verify(message.errorDetails[i]); + if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { + if (!Array.isArray(message.reportLogMessages)) + return "reportLogMessages: array expected"; + for (var i = 0; i < message.reportLogMessages.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); if (error) - return "errorDetails." + error; + return "reportLogMessages." + error; } } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - if (!$util.isInteger(message.errorCount)) - return "errorCount: integer expected"; + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + if (!$util.isString(message.consoleUri)) + return "consoleUri: string expected"; return null; }; /** - * Creates a ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult */ - ResourceErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail) + TranslationTaskResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationTaskResult) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); - if (object.resourceInfo != null) { - if (typeof object.resourceInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.resourceInfo: object expected"); - message.resourceInfo = $root.google.rpc.ResourceInfo.fromObject(object.resourceInfo); + var message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); + if (object.translatedLiterals) { + if (!Array.isArray(object.translatedLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); + message.translatedLiterals = []; + for (var i = 0; i < object.translatedLiterals.length; ++i) { + if (typeof object.translatedLiterals[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); + message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); + } } - if (object.errorDetails) { - if (!Array.isArray(object.errorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: array expected"); - message.errorDetails = []; - for (var i = 0; i < object.errorDetails.length; ++i) { - if (typeof object.errorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: object expected"); - message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.fromObject(object.errorDetails[i]); + if (object.reportLogMessages) { + if (!Array.isArray(object.reportLogMessages)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); + message.reportLogMessages = []; + for (var i = 0; i < object.reportLogMessages.length; ++i) { + if (typeof object.reportLogMessages[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); + message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); } } - if (object.errorCount != null) - message.errorCount = object.errorCount | 0; + if (object.consoleUri != null) + message.consoleUri = String(object.consoleUri); return message; }; /** - * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. + * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail + * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceErrorDetail.toObject = function toObject(message, options) { + TranslationTaskResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorDetails = []; - if (options.defaults) { - object.resourceInfo = null; - object.errorCount = 0; - } - if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) - object.resourceInfo = $root.google.rpc.ResourceInfo.toObject(message.resourceInfo, options); - if (message.errorDetails && message.errorDetails.length) { - object.errorDetails = []; - for (var j = 0; j < message.errorDetails.length; ++j) - object.errorDetails[j] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.toObject(message.errorDetails[j], options); + if (options.arrays || options.defaults) { + object.translatedLiterals = []; + object.reportLogMessages = []; } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; + if (options.defaults) + object.consoleUri = ""; + if (message.translatedLiterals && message.translatedLiterals.length) { + object.translatedLiterals = []; + for (var j = 0; j < message.translatedLiterals.length; ++j) + object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); + } + if (message.reportLogMessages && message.reportLogMessages.length) { + object.reportLogMessages = []; + for (var j = 0; j < message.reportLogMessages.length; ++j) + object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); + } + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + object.consoleUri = message.consoleUri; return object; }; /** - * Converts this ResourceErrorDetail to JSON. + * Converts this TranslationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance * @returns {Object.} JSON object */ - ResourceErrorDetail.prototype.toJSON = function toJSON() { + TranslationTaskResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceErrorDetail + * Gets the default type url for TranslationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; }; - return ResourceErrorDetail; + return TranslationTaskResult; })(); - v2.ErrorDetail = (function() { + v2.ResourceErrorDetail = (function() { /** - * Properties of an ErrorDetail. + * Properties of a ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorDetail - * @property {google.cloud.bigquery.migration.v2.IErrorLocation|null} [location] ErrorDetail location - * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo + * @interface IResourceErrorDetail + * @property {google.rpc.IResourceInfo|null} [resourceInfo] ResourceErrorDetail resourceInfo + * @property {Array.|null} [errorDetails] ResourceErrorDetail errorDetails + * @property {number|null} [errorCount] ResourceErrorDetail errorCount */ /** - * Constructs a new ErrorDetail. + * Constructs a new ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorDetail. - * @implements IErrorDetail + * @classdesc Represents a ResourceErrorDetail. + * @implements IResourceErrorDetail * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set */ - function ErrorDetail(properties) { + function ResourceErrorDetail(properties) { + this.errorDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2522,91 +2840,108 @@ } /** - * ErrorDetail location. - * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * ResourceErrorDetail resourceInfo. + * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorDetail.prototype.location = null; + ResourceErrorDetail.prototype.resourceInfo = null; /** - * ErrorDetail errorInfo. - * @member {google.rpc.IErrorInfo|null|undefined} errorInfo - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * ResourceErrorDetail errorDetails. + * @member {Array.} errorDetails + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorDetail.prototype.errorInfo = null; + ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; /** - * Creates a new ErrorDetail instance using the specified properties. + * ResourceErrorDetail errorCount. + * @member {number} errorCount + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.errorCount = 0; + + /** + * Creates a new ResourceErrorDetail instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance */ - ErrorDetail.create = function create(properties) { - return new ErrorDetail(properties); + ResourceErrorDetail.create = function create(properties) { + return new ResourceErrorDetail(properties); }; /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorDetail.encode = function encode(message, writer) { + ResourceErrorDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) - $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceInfo != null && Object.hasOwnProperty.call(message, "resourceInfo")) + $root.google.rpc.ResourceInfo.encode(message.resourceInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorDetails != null && message.errorDetails.length) + for (var i = 0; i < message.errorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ErrorDetail.encode(message.errorDetails[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.errorCount); return writer; }; /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorDetail message from the specified reader or buffer. + * Decodes a ResourceErrorDetail message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorDetail.decode = function decode(reader, length, error) { + ResourceErrorDetail.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); + message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); break; } case 2: { - message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + if (!(message.errorDetails && message.errorDetails.length)) + message.errorDetails = []; + message.errorDetails.push($root.google.cloud.bigquery.migration.v2.ErrorDetail.decode(reader, reader.uint32())); + break; + } + case 3: { + message.errorCount = reader.int32(); break; } default: @@ -2618,133 +2953,393 @@ }; /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + ResourceErrorDetail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ErrorDetail message. + * Verifies a ResourceErrorDetail message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ErrorDetail.verify = function verify(message) { + ResourceErrorDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); + if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) { + var error = $root.google.rpc.ResourceInfo.verify(message.resourceInfo); if (error) - return "location." + error; + return "resourceInfo." + error; } - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { - var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); - if (error) - return "errorInfo." + error; + if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) { + if (!Array.isArray(message.errorDetails)) + return "errorDetails: array expected"; + for (var i = 0; i < message.errorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ErrorDetail.verify(message.errorDetails[i]); + if (error) + return "errorDetails." + error; + } } + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + if (!$util.isInteger(message.errorCount)) + return "errorCount: integer expected"; return null; }; /** - * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail */ - ErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + ResourceErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); + var message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); + if (object.resourceInfo != null) { + if (typeof object.resourceInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.resourceInfo: object expected"); + message.resourceInfo = $root.google.rpc.ResourceInfo.fromObject(object.resourceInfo); } - if (object.errorInfo != null) { - if (typeof object.errorInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); - message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + if (object.errorDetails) { + if (!Array.isArray(object.errorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: array expected"); + message.errorDetails = []; + for (var i = 0; i < object.errorDetails.length; ++i) { + if (typeof object.errorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: object expected"); + message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.fromObject(object.errorDetails[i]); + } } + if (object.errorCount != null) + message.errorCount = object.errorCount | 0; return message; }; /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorDetail.toObject = function toObject(message, options) { + ResourceErrorDetail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errorDetails = []; if (options.defaults) { - object.location = null; - object.errorInfo = null; + object.resourceInfo = null; + object.errorCount = 0; } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) - object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) + object.resourceInfo = $root.google.rpc.ResourceInfo.toObject(message.resourceInfo, options); + if (message.errorDetails && message.errorDetails.length) { + object.errorDetails = []; + for (var j = 0; j < message.errorDetails.length; ++j) + object.errorDetails[j] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.toObject(message.errorDetails[j], options); + } + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + object.errorCount = message.errorCount; return object; }; /** - * Converts this ErrorDetail to JSON. + * Converts this ResourceErrorDetail to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance * @returns {Object.} JSON object */ - ErrorDetail.prototype.toJSON = function toJSON() { + ResourceErrorDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ErrorDetail + * Gets the default type url for ResourceErrorDetail * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; }; - return ErrorDetail; + return ResourceErrorDetail; })(); - v2.ErrorLocation = (function() { + v2.ErrorDetail = (function() { /** - * Properties of an ErrorLocation. + * Properties of an ErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorLocation - * @property {number|null} [line] ErrorLocation line - * @property {number|null} [column] ErrorLocation column - */ - + * @interface IErrorDetail + * @property {google.cloud.bigquery.migration.v2.IErrorLocation|null} [location] ErrorDetail location + * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo + */ + + /** + * Constructs a new ErrorDetail. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ErrorDetail. + * @implements IErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + */ + function ErrorDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorDetail location. + * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.location = null; + + /** + * ErrorDetail errorInfo. + * @member {google.rpc.IErrorInfo|null|undefined} errorInfo + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.errorInfo = null; + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance + */ + ErrorDetail.create = function create(properties) { + return new ErrorDetail(properties); + }; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) + $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { + var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); + if (error) + return "errorInfo." + error; + } + return null; + }; + + /** + * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + */ + ErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); + } + if (object.errorInfo != null) { + if (typeof object.errorInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); + message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + } + return message; + }; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.errorInfo = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) + object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + return object; + }; + + /** + * Converts this ErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; + }; + + return ErrorDetail; + })(); + + v2.ErrorLocation = (function() { + + /** + * Properties of an ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IErrorLocation + * @property {number|null} [line] ErrorLocation line + * @property {number|null} [column] ErrorLocation column + */ + /** * Constructs a new ErrorLocation. * @memberof google.cloud.bigquery.migration.v2 @@ -5281,152 +5876,506 @@ }; /** - * Creates a plain object from a Dialect message. Also converts values to other types if specified. + * Creates a plain object from a Dialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.Dialect} message Dialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dialect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { + object.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.toObject(message.bigqueryDialect, options); + if (options.oneofs) + object.dialectValue = "bigqueryDialect"; + } + if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { + object.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.toObject(message.hiveqlDialect, options); + if (options.oneofs) + object.dialectValue = "hiveqlDialect"; + } + if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { + object.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.toObject(message.redshiftDialect, options); + if (options.oneofs) + object.dialectValue = "redshiftDialect"; + } + if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { + object.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.toObject(message.teradataDialect, options); + if (options.oneofs) + object.dialectValue = "teradataDialect"; + } + if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { + object.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.toObject(message.oracleDialect, options); + if (options.oneofs) + object.dialectValue = "oracleDialect"; + } + if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { + object.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.toObject(message.sparksqlDialect, options); + if (options.oneofs) + object.dialectValue = "sparksqlDialect"; + } + if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { + object.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.toObject(message.snowflakeDialect, options); + if (options.oneofs) + object.dialectValue = "snowflakeDialect"; + } + if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { + object.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.toObject(message.netezzaDialect, options); + if (options.oneofs) + object.dialectValue = "netezzaDialect"; + } + if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { + object.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.toObject(message.azureSynapseDialect, options); + if (options.oneofs) + object.dialectValue = "azureSynapseDialect"; + } + if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { + object.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.toObject(message.verticaDialect, options); + if (options.oneofs) + object.dialectValue = "verticaDialect"; + } + if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { + object.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.toObject(message.sqlServerDialect, options); + if (options.oneofs) + object.dialectValue = "sqlServerDialect"; + } + if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { + object.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.toObject(message.postgresqlDialect, options); + if (options.oneofs) + object.dialectValue = "postgresqlDialect"; + } + if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { + object.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.toObject(message.prestoDialect, options); + if (options.oneofs) + object.dialectValue = "prestoDialect"; + } + if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { + object.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.toObject(message.mysqlDialect, options); + if (options.oneofs) + object.dialectValue = "mysqlDialect"; + } + if (message.db2Dialect != null && message.hasOwnProperty("db2Dialect")) { + object.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.toObject(message.db2Dialect, options); + if (options.oneofs) + object.dialectValue = "db2Dialect"; + } + if (message.sqliteDialect != null && message.hasOwnProperty("sqliteDialect")) { + object.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.toObject(message.sqliteDialect, options); + if (options.oneofs) + object.dialectValue = "sqliteDialect"; + } + if (message.greenplumDialect != null && message.hasOwnProperty("greenplumDialect")) { + object.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.toObject(message.greenplumDialect, options); + if (options.oneofs) + object.dialectValue = "greenplumDialect"; + } + return object; + }; + + /** + * Converts this Dialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + * @returns {Object.} JSON object + */ + Dialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Dialect"; + }; + + return Dialect; + })(); + + v2.BigQueryDialect = (function() { + + /** + * Properties of a BigQueryDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IBigQueryDialect + */ + + /** + * Constructs a new BigQueryDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a BigQueryDialect. + * @implements IBigQueryDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + */ + function BigQueryDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new BigQueryDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect instance + */ + BigQueryDialect.create = function create(properties) { + return new BigQueryDialect(properties); + }; + + /** + * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + */ + BigQueryDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + }; + + /** + * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BigQueryDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @instance + * @returns {Object.} JSON object + */ + BigQueryDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; + }; + + return BigQueryDialect; + })(); + + v2.HiveQLDialect = (function() { + + /** + * Properties of a HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IHiveQLDialect + */ + + /** + * Constructs a new HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a HiveQLDialect. + * @implements IHiveQLDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + */ + function HiveQLDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HiveQLDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance + */ + HiveQLDialect.create = function create(properties) { + return new HiveQLDialect(properties); + }; + + /** + * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveQLDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveQLDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + */ + HiveQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + }; + + /** + * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.Dialect} message Dialect + * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dialect.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { - object.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.toObject(message.bigqueryDialect, options); - if (options.oneofs) - object.dialectValue = "bigqueryDialect"; - } - if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { - object.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.toObject(message.hiveqlDialect, options); - if (options.oneofs) - object.dialectValue = "hiveqlDialect"; - } - if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { - object.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.toObject(message.redshiftDialect, options); - if (options.oneofs) - object.dialectValue = "redshiftDialect"; - } - if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { - object.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.toObject(message.teradataDialect, options); - if (options.oneofs) - object.dialectValue = "teradataDialect"; - } - if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { - object.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.toObject(message.oracleDialect, options); - if (options.oneofs) - object.dialectValue = "oracleDialect"; - } - if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { - object.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.toObject(message.sparksqlDialect, options); - if (options.oneofs) - object.dialectValue = "sparksqlDialect"; - } - if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { - object.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.toObject(message.snowflakeDialect, options); - if (options.oneofs) - object.dialectValue = "snowflakeDialect"; - } - if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { - object.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.toObject(message.netezzaDialect, options); - if (options.oneofs) - object.dialectValue = "netezzaDialect"; - } - if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { - object.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.toObject(message.azureSynapseDialect, options); - if (options.oneofs) - object.dialectValue = "azureSynapseDialect"; - } - if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { - object.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.toObject(message.verticaDialect, options); - if (options.oneofs) - object.dialectValue = "verticaDialect"; - } - if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { - object.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.toObject(message.sqlServerDialect, options); - if (options.oneofs) - object.dialectValue = "sqlServerDialect"; - } - if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { - object.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.toObject(message.postgresqlDialect, options); - if (options.oneofs) - object.dialectValue = "postgresqlDialect"; - } - if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { - object.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.toObject(message.prestoDialect, options); - if (options.oneofs) - object.dialectValue = "prestoDialect"; - } - if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { - object.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.toObject(message.mysqlDialect, options); - if (options.oneofs) - object.dialectValue = "mysqlDialect"; - } - if (message.db2Dialect != null && message.hasOwnProperty("db2Dialect")) { - object.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.toObject(message.db2Dialect, options); - if (options.oneofs) - object.dialectValue = "db2Dialect"; - } - if (message.sqliteDialect != null && message.hasOwnProperty("sqliteDialect")) { - object.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.toObject(message.sqliteDialect, options); - if (options.oneofs) - object.dialectValue = "sqliteDialect"; - } - if (message.greenplumDialect != null && message.hasOwnProperty("greenplumDialect")) { - object.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.toObject(message.greenplumDialect, options); - if (options.oneofs) - object.dialectValue = "greenplumDialect"; - } - return object; + HiveQLDialect.toObject = function toObject() { + return {}; }; /** - * Converts this Dialect to JSON. + * Converts this HiveQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @instance * @returns {Object.} JSON object */ - Dialect.prototype.toJSON = function toJSON() { + HiveQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Dialect + * Gets the default type url for HiveQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Dialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.HiveQLDialect"; }; - return Dialect; + return HiveQLDialect; })(); - v2.BigQueryDialect = (function() { + v2.RedshiftDialect = (function() { /** - * Properties of a BigQueryDialect. + * Properties of a RedshiftDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IBigQueryDialect + * @interface IRedshiftDialect */ /** - * Constructs a new BigQueryDialect. + * Constructs a new RedshiftDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a BigQueryDialect. - * @implements IBigQueryDialect + * @classdesc Represents a RedshiftDialect. + * @implements IRedshiftDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set */ - function BigQueryDialect(properties) { + function RedshiftDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5434,60 +6383,60 @@ } /** - * Creates a new BigQueryDialect instance using the specified properties. + * Creates a new RedshiftDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect instance + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect instance */ - BigQueryDialect.create = function create(properties) { - return new BigQueryDialect(properties); + RedshiftDialect.create = function create(properties) { + return new RedshiftDialect(properties); }; /** - * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDialect.encode = function encode(message, writer) { + RedshiftDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDialect.encodeDelimited = function encodeDelimited(message, writer) { + RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDialect message from the specified reader or buffer. + * Decodes a RedshiftDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDialect.decode = function decode(reader, length, error) { + RedshiftDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5502,108 +6451,109 @@ }; /** - * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + RedshiftDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDialect message. + * Verifies a RedshiftDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDialect.verify = function verify(message) { + RedshiftDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * Creates a RedshiftDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect */ - BigQueryDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + RedshiftDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.RedshiftDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + return new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); }; /** - * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDialect.toObject = function toObject() { + RedshiftDialect.toObject = function toObject() { return {}; }; /** - * Converts this BigQueryDialect to JSON. + * Converts this RedshiftDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @instance * @returns {Object.} JSON object */ - BigQueryDialect.prototype.toJSON = function toJSON() { + RedshiftDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryDialect + * Gets the default type url for RedshiftDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.RedshiftDialect"; }; - return BigQueryDialect; + return RedshiftDialect; })(); - v2.HiveQLDialect = (function() { + v2.TeradataDialect = (function() { /** - * Properties of a HiveQLDialect. + * Properties of a TeradataDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IHiveQLDialect + * @interface ITeradataDialect + * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode */ /** - * Constructs a new HiveQLDialect. + * Constructs a new TeradataDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a HiveQLDialect. - * @implements IHiveQLDialect + * @classdesc Represents a TeradataDialect. + * @implements ITeradataDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set */ - function HiveQLDialect(properties) { + function TeradataDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5611,65 +6561,79 @@ } /** - * Creates a new HiveQLDialect instance using the specified properties. + * TeradataDialect mode. + * @member {google.cloud.bigquery.migration.v2.TeradataDialect.Mode} mode + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @instance + */ + TeradataDialect.prototype.mode = 0; + + /** + * Creates a new TeradataDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect instance */ - HiveQLDialect.create = function create(properties) { - return new HiveQLDialect(properties); + TeradataDialect.create = function create(properties) { + return new TeradataDialect(properties); }; /** - * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveQLDialect.encode = function encode(message, writer) { + TeradataDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveQLDialect message from the specified reader or buffer. + * Decodes a TeradataDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveQLDialect.decode = function decode(reader, length, error) { + TeradataDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5679,108 +6643,161 @@ }; /** - * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { + TeradataDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HiveQLDialect message. + * Verifies a TeradataDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HiveQLDialect.verify = function verify(message) { + TeradataDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a TeradataDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect */ - HiveQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + TeradataDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SQL": + case 1: + message.mode = 1; + break; + case "BTEQ": + case 2: + message.mode = 2; + break; + } + return message; }; /** - * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect + * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveQLDialect.toObject = function toObject() { - return {}; + TeradataDialect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] : message.mode; + return object; }; /** - * Converts this HiveQLDialect to JSON. + * Converts this TeradataDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @instance * @returns {Object.} JSON object */ - HiveQLDialect.prototype.toJSON = function toJSON() { + TeradataDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HiveQLDialect + * Gets the default type url for TeradataDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.HiveQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TeradataDialect"; }; - return HiveQLDialect; + /** + * Mode enum. + * @name google.cloud.bigquery.migration.v2.TeradataDialect.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} SQL=1 SQL value + * @property {number} BTEQ=2 BTEQ value + */ + TeradataDialect.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SQL"] = 1; + values[valuesById[2] = "BTEQ"] = 2; + return values; + })(); + + return TeradataDialect; })(); - v2.RedshiftDialect = (function() { + v2.OracleDialect = (function() { /** - * Properties of a RedshiftDialect. + * Properties of an OracleDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IRedshiftDialect + * @interface IOracleDialect */ /** - * Constructs a new RedshiftDialect. + * Constructs a new OracleDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a RedshiftDialect. - * @implements IRedshiftDialect + * @classdesc Represents an OracleDialect. + * @implements IOracleDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set */ - function RedshiftDialect(properties) { + function OracleDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5788,60 +6805,60 @@ } /** - * Creates a new RedshiftDialect instance using the specified properties. + * Creates a new OracleDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect instance + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect instance */ - RedshiftDialect.create = function create(properties) { - return new RedshiftDialect(properties); + OracleDialect.create = function create(properties) { + return new OracleDialect(properties); }; /** - * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedshiftDialect.encode = function encode(message, writer) { + OracleDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { + OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RedshiftDialect message from the specified reader or buffer. + * Decodes an OracleDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedshiftDialect.decode = function decode(reader, length, error) { + OracleDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5856,109 +6873,108 @@ }; /** - * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. + * Decodes an OracleDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedshiftDialect.decodeDelimited = function decodeDelimited(reader) { + OracleDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RedshiftDialect message. + * Verifies an OracleDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RedshiftDialect.verify = function verify(message) { + OracleDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a RedshiftDialect message from a plain object. Also converts values to their respective internal types. + * Creates an OracleDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect - */ - RedshiftDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.RedshiftDialect) + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + */ + OracleDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.OracleDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + return new $root.google.cloud.bigquery.migration.v2.OracleDialect(); }; /** - * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. + * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect + * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RedshiftDialect.toObject = function toObject() { + OracleDialect.toObject = function toObject() { return {}; }; /** - * Converts this RedshiftDialect to JSON. + * Converts this OracleDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @instance * @returns {Object.} JSON object */ - RedshiftDialect.prototype.toJSON = function toJSON() { + OracleDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RedshiftDialect + * Gets the default type url for OracleDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.RedshiftDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.OracleDialect"; }; - return RedshiftDialect; + return OracleDialect; })(); - v2.TeradataDialect = (function() { + v2.SparkSQLDialect = (function() { /** - * Properties of a TeradataDialect. + * Properties of a SparkSQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITeradataDialect - * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode + * @interface ISparkSQLDialect */ /** - * Constructs a new TeradataDialect. + * Constructs a new SparkSQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TeradataDialect. - * @implements ITeradataDialect + * @classdesc Represents a SparkSQLDialect. + * @implements ISparkSQLDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set */ - function TeradataDialect(properties) { + function SparkSQLDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5966,79 +6982,65 @@ } /** - * TeradataDialect mode. - * @member {google.cloud.bigquery.migration.v2.TeradataDialect.Mode} mode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect - * @instance - */ - TeradataDialect.prototype.mode = 0; - - /** - * Creates a new TeradataDialect instance using the specified properties. + * Creates a new SparkSQLDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect instance + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect instance */ - TeradataDialect.create = function create(properties) { - return new TeradataDialect(properties); + SparkSQLDialect.create = function create(properties) { + return new SparkSQLDialect(properties); }; /** - * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TeradataDialect.encode = function encode(message, writer) { + SparkSQLDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { + SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TeradataDialect message from the specified reader or buffer. + * Decodes a SparkSQLDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TeradataDialect.decode = function decode(reader, length, error) { + SparkSQLDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6048,161 +7050,108 @@ }; /** - * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. + * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TeradataDialect.decodeDelimited = function decodeDelimited(reader) { + SparkSQLDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TeradataDialect message. + * Verifies a SparkSQLDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TeradataDialect.verify = function verify(message) { + SparkSQLDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a TeradataDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SparkSQLDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect */ - TeradataDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) + SparkSQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "SQL": - case 1: - message.mode = 1; - break; - case "BTEQ": - case 2: - message.mode = 2; - break; - } - return message; + return new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); }; /** - * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. + * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect + * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TeradataDialect.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] : message.mode; - return object; + SparkSQLDialect.toObject = function toObject() { + return {}; }; /** - * Converts this TeradataDialect to JSON. + * Converts this SparkSQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @instance * @returns {Object.} JSON object */ - TeradataDialect.prototype.toJSON = function toJSON() { + SparkSQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TeradataDialect + * Gets the default type url for SparkSQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TeradataDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SparkSQLDialect"; }; - /** - * Mode enum. - * @name google.cloud.bigquery.migration.v2.TeradataDialect.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} SQL=1 SQL value - * @property {number} BTEQ=2 BTEQ value - */ - TeradataDialect.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SQL"] = 1; - values[valuesById[2] = "BTEQ"] = 2; - return values; - })(); - - return TeradataDialect; + return SparkSQLDialect; })(); - v2.OracleDialect = (function() { + v2.SnowflakeDialect = (function() { /** - * Properties of an OracleDialect. + * Properties of a SnowflakeDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IOracleDialect + * @interface ISnowflakeDialect */ /** - * Constructs a new OracleDialect. + * Constructs a new SnowflakeDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an OracleDialect. - * @implements IOracleDialect + * @classdesc Represents a SnowflakeDialect. + * @implements ISnowflakeDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set */ - function OracleDialect(properties) { + function SnowflakeDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6210,60 +7159,60 @@ } /** - * Creates a new OracleDialect instance using the specified properties. + * Creates a new SnowflakeDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect instance + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect instance */ - OracleDialect.create = function create(properties) { - return new OracleDialect(properties); + SnowflakeDialect.create = function create(properties) { + return new SnowflakeDialect(properties); }; /** - * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleDialect.encode = function encode(message, writer) { + SnowflakeDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { + SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleDialect message from the specified reader or buffer. + * Decodes a SnowflakeDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleDialect.decode = function decode(reader, length, error) { + SnowflakeDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6278,108 +7227,108 @@ }; /** - * Decodes an OracleDialect message from the specified reader or buffer, length delimited. + * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleDialect.decodeDelimited = function decodeDelimited(reader) { + SnowflakeDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleDialect message. + * Verifies a SnowflakeDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleDialect.verify = function verify(message) { + SnowflakeDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an OracleDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SnowflakeDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect */ - OracleDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.OracleDialect) + SnowflakeDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SnowflakeDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.OracleDialect(); + return new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); }; /** - * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. + * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect + * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleDialect.toObject = function toObject() { + SnowflakeDialect.toObject = function toObject() { return {}; }; /** - * Converts this OracleDialect to JSON. + * Converts this SnowflakeDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @instance * @returns {Object.} JSON object */ - OracleDialect.prototype.toJSON = function toJSON() { + SnowflakeDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleDialect + * Gets the default type url for SnowflakeDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.OracleDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SnowflakeDialect"; }; - return OracleDialect; + return SnowflakeDialect; })(); - v2.SparkSQLDialect = (function() { + v2.NetezzaDialect = (function() { /** - * Properties of a SparkSQLDialect. + * Properties of a NetezzaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISparkSQLDialect + * @interface INetezzaDialect */ /** - * Constructs a new SparkSQLDialect. + * Constructs a new NetezzaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SparkSQLDialect. - * @implements ISparkSQLDialect + * @classdesc Represents a NetezzaDialect. + * @implements INetezzaDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set */ - function SparkSQLDialect(properties) { + function NetezzaDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6387,60 +7336,60 @@ } /** - * Creates a new SparkSQLDialect instance using the specified properties. + * Creates a new NetezzaDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect instance + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect instance */ - SparkSQLDialect.create = function create(properties) { - return new SparkSQLDialect(properties); + NetezzaDialect.create = function create(properties) { + return new NetezzaDialect(properties); }; /** - * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkSQLDialect.encode = function encode(message, writer) { + NetezzaDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SparkSQLDialect message from the specified reader or buffer. + * Decodes a NetezzaDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkSQLDialect.decode = function decode(reader, length, error) { + NetezzaDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6455,108 +7404,108 @@ }; /** - * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. + * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkSQLDialect.decodeDelimited = function decodeDelimited(reader) { + NetezzaDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SparkSQLDialect message. + * Verifies a NetezzaDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SparkSQLDialect.verify = function verify(message) { + NetezzaDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SparkSQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a NetezzaDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect */ - SparkSQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) + NetezzaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NetezzaDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); }; /** - * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect + * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SparkSQLDialect.toObject = function toObject() { + NetezzaDialect.toObject = function toObject() { return {}; }; /** - * Converts this SparkSQLDialect to JSON. + * Converts this NetezzaDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @instance * @returns {Object.} JSON object */ - SparkSQLDialect.prototype.toJSON = function toJSON() { + NetezzaDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SparkSQLDialect + * Gets the default type url for NetezzaDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SparkSQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NetezzaDialect"; }; - return SparkSQLDialect; + return NetezzaDialect; })(); - v2.SnowflakeDialect = (function() { + v2.AzureSynapseDialect = (function() { /** - * Properties of a SnowflakeDialect. + * Properties of an AzureSynapseDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISnowflakeDialect + * @interface IAzureSynapseDialect */ /** - * Constructs a new SnowflakeDialect. + * Constructs a new AzureSynapseDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SnowflakeDialect. - * @implements ISnowflakeDialect + * @classdesc Represents an AzureSynapseDialect. + * @implements IAzureSynapseDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set */ - function SnowflakeDialect(properties) { + function AzureSynapseDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6564,60 +7513,60 @@ } /** - * Creates a new SnowflakeDialect instance using the specified properties. + * Creates a new AzureSynapseDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect instance + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect instance */ - SnowflakeDialect.create = function create(properties) { - return new SnowflakeDialect(properties); + AzureSynapseDialect.create = function create(properties) { + return new AzureSynapseDialect(properties); }; /** - * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnowflakeDialect.encode = function encode(message, writer) { + AzureSynapseDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { + AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SnowflakeDialect message from the specified reader or buffer. + * Decodes an AzureSynapseDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SnowflakeDialect.decode = function decode(reader, length, error) { + AzureSynapseDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6632,108 +7581,108 @@ }; /** - * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. + * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SnowflakeDialect.decodeDelimited = function decodeDelimited(reader) { + AzureSynapseDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SnowflakeDialect message. + * Verifies an AzureSynapseDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SnowflakeDialect.verify = function verify(message) { + AzureSynapseDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SnowflakeDialect message from a plain object. Also converts values to their respective internal types. + * Creates an AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect */ - SnowflakeDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SnowflakeDialect) + AzureSynapseDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); + return new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); }; /** - * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. + * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect + * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SnowflakeDialect.toObject = function toObject() { + AzureSynapseDialect.toObject = function toObject() { return {}; }; /** - * Converts this SnowflakeDialect to JSON. + * Converts this AzureSynapseDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @instance * @returns {Object.} JSON object */ - SnowflakeDialect.prototype.toJSON = function toJSON() { + AzureSynapseDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SnowflakeDialect + * Gets the default type url for AzureSynapseDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SnowflakeDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AzureSynapseDialect"; }; - return SnowflakeDialect; + return AzureSynapseDialect; })(); - v2.NetezzaDialect = (function() { + v2.VerticaDialect = (function() { /** - * Properties of a NetezzaDialect. + * Properties of a VerticaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface INetezzaDialect + * @interface IVerticaDialect */ /** - * Constructs a new NetezzaDialect. + * Constructs a new VerticaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NetezzaDialect. - * @implements INetezzaDialect + * @classdesc Represents a VerticaDialect. + * @implements IVerticaDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set */ - function NetezzaDialect(properties) { + function VerticaDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6741,60 +7690,60 @@ } /** - * Creates a new NetezzaDialect instance using the specified properties. + * Creates a new VerticaDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect instance + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect instance */ - NetezzaDialect.create = function create(properties) { - return new NetezzaDialect(properties); + VerticaDialect.create = function create(properties) { + return new VerticaDialect(properties); }; /** - * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetezzaDialect.encode = function encode(message, writer) { + VerticaDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { + VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetezzaDialect message from the specified reader or buffer. + * Decodes a VerticaDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetezzaDialect.decode = function decode(reader, length, error) { + VerticaDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6809,108 +7758,108 @@ }; /** - * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. + * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetezzaDialect.decodeDelimited = function decodeDelimited(reader) { + VerticaDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NetezzaDialect message. + * Verifies a VerticaDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NetezzaDialect.verify = function verify(message) { + VerticaDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a NetezzaDialect message from a plain object. Also converts values to their respective internal types. + * Creates a VerticaDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect */ - NetezzaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NetezzaDialect) + VerticaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); + return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); }; /** - * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. + * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect + * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetezzaDialect.toObject = function toObject() { + VerticaDialect.toObject = function toObject() { return {}; }; /** - * Converts this NetezzaDialect to JSON. + * Converts this VerticaDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @instance * @returns {Object.} JSON object */ - NetezzaDialect.prototype.toJSON = function toJSON() { + VerticaDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NetezzaDialect + * Gets the default type url for VerticaDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NetezzaDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; }; - return NetezzaDialect; + return VerticaDialect; })(); - v2.AzureSynapseDialect = (function() { + v2.SQLServerDialect = (function() { /** - * Properties of an AzureSynapseDialect. + * Properties of a SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IAzureSynapseDialect + * @interface ISQLServerDialect */ /** - * Constructs a new AzureSynapseDialect. + * Constructs a new SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an AzureSynapseDialect. - * @implements IAzureSynapseDialect + * @classdesc Represents a SQLServerDialect. + * @implements ISQLServerDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set */ - function AzureSynapseDialect(properties) { + function SQLServerDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6918,60 +7867,60 @@ } /** - * Creates a new AzureSynapseDialect instance using the specified properties. + * Creates a new SQLServerDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect instance + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance */ - AzureSynapseDialect.create = function create(properties) { - return new AzureSynapseDialect(properties); + SQLServerDialect.create = function create(properties) { + return new SQLServerDialect(properties); }; /** - * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSynapseDialect.encode = function encode(message, writer) { + SQLServerDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer. + * Decodes a SQLServerDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSynapseDialect.decode = function decode(reader, length, error) { + SQLServerDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6986,108 +7935,108 @@ }; /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. + * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSynapseDialect.decodeDelimited = function decodeDelimited(reader) { + SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureSynapseDialect message. + * Verifies a SQLServerDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureSynapseDialect.verify = function verify(message) { + SQLServerDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect */ - AzureSynapseDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect) + SQLServerDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLServerDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); }; /** - * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. + * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect + * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureSynapseDialect.toObject = function toObject() { + SQLServerDialect.toObject = function toObject() { return {}; }; /** - * Converts this AzureSynapseDialect to JSON. + * Converts this SQLServerDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @instance * @returns {Object.} JSON object */ - AzureSynapseDialect.prototype.toJSON = function toJSON() { + SQLServerDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureSynapseDialect + * Gets the default type url for SQLServerDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AzureSynapseDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; }; - return AzureSynapseDialect; + return SQLServerDialect; })(); - v2.VerticaDialect = (function() { + v2.PostgresqlDialect = (function() { /** - * Properties of a VerticaDialect. + * Properties of a PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IVerticaDialect + * @interface IPostgresqlDialect */ /** - * Constructs a new VerticaDialect. + * Constructs a new PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a VerticaDialect. - * @implements IVerticaDialect + * @classdesc Represents a PostgresqlDialect. + * @implements IPostgresqlDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set */ - function VerticaDialect(properties) { + function PostgresqlDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7095,60 +8044,60 @@ } /** - * Creates a new VerticaDialect instance using the specified properties. + * Creates a new PostgresqlDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect instance + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance */ - VerticaDialect.create = function create(properties) { - return new VerticaDialect(properties); + PostgresqlDialect.create = function create(properties) { + return new PostgresqlDialect(properties); }; /** - * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerticaDialect.encode = function encode(message, writer) { + PostgresqlDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerticaDialect message from the specified reader or buffer. + * Decodes a PostgresqlDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerticaDialect.decode = function decode(reader, length, error) { + PostgresqlDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7163,108 +8112,108 @@ }; /** - * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerticaDialect.decodeDelimited = function decodeDelimited(reader) { + PostgresqlDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerticaDialect message. + * Verifies a PostgresqlDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerticaDialect.verify = function verify(message) { + PostgresqlDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a VerticaDialect message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect */ - VerticaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) + PostgresqlDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.PostgresqlDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); }; /** - * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect + * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerticaDialect.toObject = function toObject() { + PostgresqlDialect.toObject = function toObject() { return {}; }; /** - * Converts this VerticaDialect to JSON. + * Converts this PostgresqlDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @instance * @returns {Object.} JSON object */ - VerticaDialect.prototype.toJSON = function toJSON() { + PostgresqlDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VerticaDialect + * Gets the default type url for PostgresqlDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; }; - return VerticaDialect; + return PostgresqlDialect; })(); - v2.SQLServerDialect = (function() { + v2.PrestoDialect = (function() { /** - * Properties of a SQLServerDialect. + * Properties of a PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLServerDialect + * @interface IPrestoDialect */ /** - * Constructs a new SQLServerDialect. + * Constructs a new PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLServerDialect. - * @implements ISQLServerDialect + * @classdesc Represents a PrestoDialect. + * @implements IPrestoDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set */ - function SQLServerDialect(properties) { + function PrestoDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7272,60 +8221,60 @@ } /** - * Creates a new SQLServerDialect instance using the specified properties. + * Creates a new PrestoDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance */ - SQLServerDialect.create = function create(properties) { - return new SQLServerDialect(properties); + PrestoDialect.create = function create(properties) { + return new PrestoDialect(properties); }; /** - * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLServerDialect.encode = function encode(message, writer) { + PrestoDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { + PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SQLServerDialect message from the specified reader or buffer. + * Decodes a PrestoDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLServerDialect.decode = function decode(reader, length, error) { + PrestoDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7340,108 +8289,108 @@ }; /** - * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. + * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { + PrestoDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SQLServerDialect message. + * Verifies a PrestoDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SQLServerDialect.verify = function verify(message) { + PrestoDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. + * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect */ - SQLServerDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLServerDialect) + PrestoDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.PrestoDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); + return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); }; /** - * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. + * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect + * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SQLServerDialect.toObject = function toObject() { + PrestoDialect.toObject = function toObject() { return {}; }; /** - * Converts this SQLServerDialect to JSON. + * Converts this PrestoDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @instance * @returns {Object.} JSON object */ - SQLServerDialect.prototype.toJSON = function toJSON() { + PrestoDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SQLServerDialect + * Gets the default type url for PrestoDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; }; - return SQLServerDialect; + return PrestoDialect; })(); - v2.PostgresqlDialect = (function() { + v2.MySQLDialect = (function() { /** - * Properties of a PostgresqlDialect. + * Properties of a MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPostgresqlDialect + * @interface IMySQLDialect */ /** - * Constructs a new PostgresqlDialect. + * Constructs a new MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PostgresqlDialect. - * @implements IPostgresqlDialect + * @classdesc Represents a MySQLDialect. + * @implements IMySQLDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set */ - function PostgresqlDialect(properties) { + function MySQLDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7449,60 +8398,60 @@ } /** - * Creates a new PostgresqlDialect instance using the specified properties. + * Creates a new MySQLDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance */ - PostgresqlDialect.create = function create(properties) { - return new PostgresqlDialect(properties); + MySQLDialect.create = function create(properties) { + return new MySQLDialect(properties); }; /** - * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlDialect.encode = function encode(message, writer) { + MySQLDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { + MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgresqlDialect message from the specified reader or buffer. + * Decodes a MySQLDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlDialect.decode = function decode(reader, length, error) { + MySQLDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7517,108 +8466,108 @@ }; /** - * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. + * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlDialect.decodeDelimited = function decodeDelimited(reader) { + MySQLDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgresqlDialect message. + * Verifies a MySQLDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgresqlDialect.verify = function verify(message) { + MySQLDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. + * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect */ - PostgresqlDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PostgresqlDialect) + MySQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); + return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); }; /** - * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. + * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect + * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlDialect.toObject = function toObject() { + MySQLDialect.toObject = function toObject() { return {}; }; /** - * Converts this PostgresqlDialect to JSON. + * Converts this MySQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @instance * @returns {Object.} JSON object */ - PostgresqlDialect.prototype.toJSON = function toJSON() { + MySQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgresqlDialect + * Gets the default type url for MySQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; }; - return PostgresqlDialect; + return MySQLDialect; })(); - v2.PrestoDialect = (function() { + v2.DB2Dialect = (function() { /** - * Properties of a PrestoDialect. + * Properties of a DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPrestoDialect + * @interface IDB2Dialect */ /** - * Constructs a new PrestoDialect. + * Constructs a new DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PrestoDialect. - * @implements IPrestoDialect + * @classdesc Represents a DB2Dialect. + * @implements IDB2Dialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set */ - function PrestoDialect(properties) { + function DB2Dialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7626,60 +8575,60 @@ } /** - * Creates a new PrestoDialect instance using the specified properties. + * Creates a new DB2Dialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance */ - PrestoDialect.create = function create(properties) { - return new PrestoDialect(properties); + DB2Dialect.create = function create(properties) { + return new DB2Dialect(properties); }; /** - * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * Encodes the specified DB2Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoDialect.encode = function encode(message, writer) { + DB2Dialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { + DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrestoDialect message from the specified reader or buffer. + * Decodes a DB2Dialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoDialect.decode = function decode(reader, length, error) { + DB2Dialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7694,108 +8643,108 @@ }; /** - * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. + * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoDialect.decodeDelimited = function decodeDelimited(reader) { + DB2Dialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrestoDialect message. + * Verifies a DB2Dialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrestoDialect.verify = function verify(message) { + DB2Dialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. + * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect */ - PrestoDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PrestoDialect) + DB2Dialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.DB2Dialect) return object; - return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); + return new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); }; /** - * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. + * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect + * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrestoDialect.toObject = function toObject() { + DB2Dialect.toObject = function toObject() { return {}; }; /** - * Converts this PrestoDialect to JSON. + * Converts this DB2Dialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @instance * @returns {Object.} JSON object */ - PrestoDialect.prototype.toJSON = function toJSON() { + DB2Dialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrestoDialect + * Gets the default type url for DB2Dialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; }; - return PrestoDialect; + return DB2Dialect; })(); - v2.MySQLDialect = (function() { + v2.SQLiteDialect = (function() { /** - * Properties of a MySQLDialect. + * Properties of a SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMySQLDialect + * @interface ISQLiteDialect */ /** - * Constructs a new MySQLDialect. + * Constructs a new SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MySQLDialect. - * @implements IMySQLDialect + * @classdesc Represents a SQLiteDialect. + * @implements ISQLiteDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set */ - function MySQLDialect(properties) { + function SQLiteDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7803,60 +8752,60 @@ } /** - * Creates a new MySQLDialect instance using the specified properties. + * Creates a new SQLiteDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance */ - MySQLDialect.create = function create(properties) { - return new MySQLDialect(properties); + SQLiteDialect.create = function create(properties) { + return new SQLiteDialect(properties); }; /** - * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * Encodes the specified SQLiteDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encode = function encode(message, writer) { + SQLiteDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * Encodes the specified SQLiteDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MySQLDialect message from the specified reader or buffer. + * Decodes a SQLiteDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySQLDialect.decode = function decode(reader, length, error) { + SQLiteDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7871,108 +8820,108 @@ }; /** - * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. + * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySQLDialect.decodeDelimited = function decodeDelimited(reader) { + SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MySQLDialect message. + * Verifies a SQLiteDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MySQLDialect.verify = function verify(message) { + SQLiteDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect */ - MySQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) + SQLiteDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLiteDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); }; /** - * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect + * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MySQLDialect.toObject = function toObject() { + SQLiteDialect.toObject = function toObject() { return {}; }; /** - * Converts this MySQLDialect to JSON. + * Converts this SQLiteDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @instance * @returns {Object.} JSON object */ - MySQLDialect.prototype.toJSON = function toJSON() { + SQLiteDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MySQLDialect + * Gets the default type url for SQLiteDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; }; - return MySQLDialect; + return SQLiteDialect; })(); - v2.DB2Dialect = (function() { + v2.GreenplumDialect = (function() { /** - * Properties of a DB2Dialect. + * Properties of a GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IDB2Dialect + * @interface IGreenplumDialect */ /** - * Constructs a new DB2Dialect. + * Constructs a new GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a DB2Dialect. - * @implements IDB2Dialect + * @classdesc Represents a GreenplumDialect. + * @implements IGreenplumDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set */ - function DB2Dialect(properties) { + function GreenplumDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7980,60 +8929,60 @@ } /** - * Creates a new DB2Dialect instance using the specified properties. + * Creates a new GreenplumDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance */ - DB2Dialect.create = function create(properties) { - return new DB2Dialect(properties); + GreenplumDialect.create = function create(properties) { + return new GreenplumDialect(properties); }; /** - * Encodes the specified DB2Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * Encodes the specified GreenplumDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DB2Dialect.encode = function encode(message, writer) { + GreenplumDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * Encodes the specified GreenplumDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { + GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DB2Dialect message from the specified reader or buffer. + * Decodes a GreenplumDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DB2Dialect.decode = function decode(reader, length, error) { + GreenplumDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -8048,108 +8997,110 @@ }; /** - * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. + * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DB2Dialect.decodeDelimited = function decodeDelimited(reader) { + GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DB2Dialect message. + * Verifies a GreenplumDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DB2Dialect.verify = function verify(message) { + GreenplumDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. + * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect */ - DB2Dialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.DB2Dialect) + GreenplumDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.GreenplumDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); + return new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); }; /** - * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. + * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect + * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DB2Dialect.toObject = function toObject() { + GreenplumDialect.toObject = function toObject() { return {}; }; /** - * Converts this DB2Dialect to JSON. + * Converts this GreenplumDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @instance * @returns {Object.} JSON object */ - DB2Dialect.prototype.toJSON = function toJSON() { + GreenplumDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DB2Dialect + * Gets the default type url for GreenplumDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; }; - return DB2Dialect; + return GreenplumDialect; })(); - v2.SQLiteDialect = (function() { + v2.ObjectNameMappingList = (function() { /** - * Properties of a SQLiteDialect. + * Properties of an ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLiteDialect + * @interface IObjectNameMappingList + * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap */ /** - * Constructs a new SQLiteDialect. + * Constructs a new ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLiteDialect. - * @implements ISQLiteDialect + * @classdesc Represents an ObjectNameMappingList. + * @implements IObjectNameMappingList * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set */ - function SQLiteDialect(properties) { + function ObjectNameMappingList(properties) { + this.nameMap = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8157,65 +9108,82 @@ } /** - * Creates a new SQLiteDialect instance using the specified properties. + * ObjectNameMappingList nameMap. + * @member {Array.} nameMap + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @instance + */ + ObjectNameMappingList.prototype.nameMap = $util.emptyArray; + + /** + * Creates a new ObjectNameMappingList instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance */ - SQLiteDialect.create = function create(properties) { - return new SQLiteDialect(properties); + ObjectNameMappingList.create = function create(properties) { + return new ObjectNameMappingList(properties); }; /** - * Encodes the specified SQLiteDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLiteDialect.encode = function encode(message, writer) { + ObjectNameMappingList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.nameMap != null && message.nameMap.length) + for (var i = 0; i < message.nameMap.length; ++i) + $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.encode(message.nameMap[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SQLiteDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SQLiteDialect message from the specified reader or buffer. + * Decodes an ObjectNameMappingList message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLiteDialect.decode = function decode(reader, length, error) { + ObjectNameMappingList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.nameMap && message.nameMap.length)) + message.nameMap = []; + message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8225,174 +9193,234 @@ }; /** - * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. + * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { + ObjectNameMappingList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SQLiteDialect message. + * Verifies an ObjectNameMappingList message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SQLiteDialect.verify = function verify(message) { + ObjectNameMappingList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.nameMap != null && message.hasOwnProperty("nameMap")) { + if (!Array.isArray(message.nameMap)) + return "nameMap: array expected"; + for (var i = 0; i < message.nameMap.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.verify(message.nameMap[i]); + if (error) + return "nameMap." + error; + } + } return null; }; /** - * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList */ - SQLiteDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLiteDialect) + ObjectNameMappingList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) return object; - return new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); + if (object.nameMap) { + if (!Array.isArray(object.nameMap)) + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: array expected"); + message.nameMap = []; + for (var i = 0; i < object.nameMap.length; ++i) { + if (typeof object.nameMap[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: object expected"); + message.nameMap[i] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.fromObject(object.nameMap[i]); + } + } + return message; }; /** - * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. + * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SQLiteDialect.toObject = function toObject() { - return {}; + ObjectNameMappingList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nameMap = []; + if (message.nameMap && message.nameMap.length) { + object.nameMap = []; + for (var j = 0; j < message.nameMap.length; ++j) + object.nameMap[j] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.toObject(message.nameMap[j], options); + } + return object; }; /** - * Converts this SQLiteDialect to JSON. + * Converts this ObjectNameMappingList to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @instance * @returns {Object.} JSON object */ - SQLiteDialect.prototype.toJSON = function toJSON() { + ObjectNameMappingList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SQLiteDialect + * Gets the default type url for ObjectNameMappingList * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; }; - return SQLiteDialect; + return ObjectNameMappingList; })(); - v2.GreenplumDialect = (function() { + v2.ObjectNameMapping = (function() { /** - * Properties of a GreenplumDialect. + * Properties of an ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @interface IGreenplumDialect + * @interface IObjectNameMapping + * @property {google.cloud.bigquery.migration.v2.INameMappingKey|null} [source] ObjectNameMapping source + * @property {google.cloud.bigquery.migration.v2.INameMappingValue|null} [target] ObjectNameMapping target */ /** - * Constructs a new GreenplumDialect. + * Constructs a new ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a GreenplumDialect. - * @implements IGreenplumDialect + * @classdesc Represents an ObjectNameMapping. + * @implements IObjectNameMapping * @constructor - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + */ + function ObjectNameMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObjectNameMapping source. + * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance + */ + ObjectNameMapping.prototype.source = null; + + /** + * ObjectNameMapping target. + * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance */ - function GreenplumDialect(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ObjectNameMapping.prototype.target = null; /** - * Creates a new GreenplumDialect instance using the specified properties. + * Creates a new ObjectNameMapping instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance */ - GreenplumDialect.create = function create(properties) { - return new GreenplumDialect(properties); + ObjectNameMapping.create = function create(properties) { + return new ObjectNameMapping(properties); }; /** - * Encodes the specified GreenplumDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GreenplumDialect.encode = function encode(message, writer) { + ObjectNameMapping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.bigquery.migration.v2.NameMappingKey.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.bigquery.migration.v2.NameMappingValue.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GreenplumDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GreenplumDialect message from the specified reader or buffer. + * Decodes an ObjectNameMapping message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GreenplumDialect.decode = function decode(reader, length, error) { + ObjectNameMapping.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8402,110 +9430,145 @@ }; /** - * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. + * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { + ObjectNameMapping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GreenplumDialect message. + * Verifies an ObjectNameMapping message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GreenplumDialect.verify = function verify(message) { + ObjectNameMapping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.bigquery.migration.v2.NameMappingKey.verify(message.source); + if (error) + return "source." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.bigquery.migration.v2.NameMappingValue.verify(message.target); + if (error) + return "target." + error; + } return null; }; /** - * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectNameMapping message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping */ - GreenplumDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.GreenplumDialect) + ObjectNameMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) return object; - return new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.source: object expected"); + message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.fromObject(object.source); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.target: object expected"); + message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.fromObject(object.target); + } + return message; }; /** - * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. + * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GreenplumDialect.toObject = function toObject() { - return {}; + ObjectNameMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.target = null; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.toObject(message.target, options); + return object; }; /** - * Converts this GreenplumDialect to JSON. + * Converts this ObjectNameMapping to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @instance * @returns {Object.} JSON object */ - GreenplumDialect.prototype.toJSON = function toJSON() { + ObjectNameMapping.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GreenplumDialect + * Gets the default type url for ObjectNameMapping * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; }; - return GreenplumDialect; + return ObjectNameMapping; })(); - v2.ObjectNameMappingList = (function() { + v2.NameMappingKey = (function() { /** - * Properties of an ObjectNameMappingList. + * Properties of a NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMappingList - * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap + * @interface INameMappingKey + * @property {google.cloud.bigquery.migration.v2.NameMappingKey.Type|null} [type] NameMappingKey type + * @property {string|null} [database] NameMappingKey database + * @property {string|null} [schema] NameMappingKey schema + * @property {string|null} [relation] NameMappingKey relation + * @property {string|null} [attribute] NameMappingKey attribute */ /** - * Constructs a new ObjectNameMappingList. + * Constructs a new NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMappingList. - * @implements IObjectNameMappingList + * @classdesc Represents a NameMappingKey. + * @implements INameMappingKey * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set */ - function ObjectNameMappingList(properties) { - this.nameMap = []; + function NameMappingKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8513,80 +9576,133 @@ } /** - * ObjectNameMappingList nameMap. - * @member {Array.} nameMap - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * NameMappingKey type. + * @member {google.cloud.bigquery.migration.v2.NameMappingKey.Type} type + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @instance */ - ObjectNameMappingList.prototype.nameMap = $util.emptyArray; + NameMappingKey.prototype.type = 0; /** - * Creates a new ObjectNameMappingList instance using the specified properties. + * NameMappingKey database. + * @member {string} database + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.database = ""; + + /** + * NameMappingKey schema. + * @member {string} schema + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.schema = ""; + + /** + * NameMappingKey relation. + * @member {string} relation + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.relation = ""; + + /** + * NameMappingKey attribute. + * @member {string} attribute + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.attribute = ""; + + /** + * Creates a new NameMappingKey instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance */ - ObjectNameMappingList.create = function create(properties) { - return new ObjectNameMappingList(properties); + NameMappingKey.create = function create(properties) { + return new NameMappingKey(properties); }; /** - * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encode = function encode(message, writer) { + NameMappingKey.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nameMap != null && message.nameMap.length) - for (var i = 0; i < message.nameMap.length; ++i) - $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.encode(message.nameMap[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.relation); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.attribute); return writer; }; /** - * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * Decodes a NameMappingKey message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMappingList.decode = function decode(reader, length, error) { + NameMappingKey.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.nameMap && message.nameMap.length)) - message.nameMap = []; - message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); + message.type = reader.int32(); + break; + } + case 2: { + message.database = reader.string(); + break; + } + case 3: { + message.schema = reader.string(); + break; + } + case 4: { + message.relation = reader.string(); + break; + } + case 5: { + message.attribute = reader.string(); break; } default: @@ -8598,140 +9714,233 @@ }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMappingList.decodeDelimited = function decodeDelimited(reader) { + NameMappingKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMappingList message. + * Verifies a NameMappingKey message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectNameMappingList.verify = function verify(message) { + NameMappingKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nameMap != null && message.hasOwnProperty("nameMap")) { - if (!Array.isArray(message.nameMap)) - return "nameMap: array expected"; - for (var i = 0; i < message.nameMap.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.verify(message.nameMap[i]); - if (error) - return "nameMap." + error; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } - } + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; return null; }; /** - * Creates an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. + * Creates a NameMappingKey message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey */ - ObjectNameMappingList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) + NameMappingKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); - if (object.nameMap) { - if (!Array.isArray(object.nameMap)) - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: array expected"); - message.nameMap = []; - for (var i = 0; i < object.nameMap.length; ++i) { - if (typeof object.nameMap[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: object expected"); - message.nameMap[i] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.fromObject(object.nameMap[i]); + var message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATABASE": + case 1: + message.type = 1; + break; + case "SCHEMA": + case 2: + message.type = 2; + break; + case "RELATION": + case 3: + message.type = 3; + break; + case "ATTRIBUTE": + case 4: + message.type = 4; + break; + case "RELATION_ALIAS": + case 5: + message.type = 5; + break; + case "ATTRIBUTE_ALIAS": + case 6: + message.type = 6; + break; + case "FUNCTION": + case 7: + message.type = 7; + break; } + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.relation != null) + message.relation = String(object.relation); + if (object.attribute != null) + message.attribute = String(object.attribute); return message; }; /** - * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. + * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList + * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMappingList.toObject = function toObject(message, options) { + NameMappingKey.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.nameMap = []; - if (message.nameMap && message.nameMap.length) { - object.nameMap = []; - for (var j = 0; j < message.nameMap.length; ++j) - object.nameMap[j] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.toObject(message.nameMap[j], options); + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.database = ""; + object.schema = ""; + object.relation = ""; + object.attribute = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] === undefined ? message.type : $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] : message.type; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.relation != null && message.hasOwnProperty("relation")) + object.relation = message.relation; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; return object; }; /** - * Converts this ObjectNameMappingList to JSON. + * Converts this NameMappingKey to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @instance * @returns {Object.} JSON object */ - ObjectNameMappingList.prototype.toJSON = function toJSON() { + NameMappingKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ObjectNameMappingList + * Gets the default type url for NameMappingKey * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; }; - return ObjectNameMappingList; + /** + * Type enum. + * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DATABASE=1 DATABASE value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} RELATION=3 RELATION value + * @property {number} ATTRIBUTE=4 ATTRIBUTE value + * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value + * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value + * @property {number} FUNCTION=7 FUNCTION value + */ + NameMappingKey.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[3] = "RELATION"] = 3; + values[valuesById[4] = "ATTRIBUTE"] = 4; + values[valuesById[5] = "RELATION_ALIAS"] = 5; + values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; + values[valuesById[7] = "FUNCTION"] = 7; + return values; + })(); + + return NameMappingKey; })(); - v2.ObjectNameMapping = (function() { + v2.NameMappingValue = (function() { /** - * Properties of an ObjectNameMapping. + * Properties of a NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMapping - * @property {google.cloud.bigquery.migration.v2.INameMappingKey|null} [source] ObjectNameMapping source - * @property {google.cloud.bigquery.migration.v2.INameMappingValue|null} [target] ObjectNameMapping target + * @interface INameMappingValue + * @property {string|null} [database] NameMappingValue database + * @property {string|null} [schema] NameMappingValue schema + * @property {string|null} [relation] NameMappingValue relation + * @property {string|null} [attribute] NameMappingValue attribute */ /** - * Constructs a new ObjectNameMapping. + * Constructs a new NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMapping. - * @implements IObjectNameMapping + * @classdesc Represents a NameMappingValue. + * @implements INameMappingValue * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set */ - function ObjectNameMapping(properties) { + function NameMappingValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8739,91 +9948,119 @@ } /** - * ObjectNameMapping source. - * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * NameMappingValue database. + * @member {string} database + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance */ - ObjectNameMapping.prototype.source = null; + NameMappingValue.prototype.database = ""; /** - * ObjectNameMapping target. - * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * NameMappingValue schema. + * @member {string} schema + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + */ + NameMappingValue.prototype.schema = ""; + + /** + * NameMappingValue relation. + * @member {string} relation + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + */ + NameMappingValue.prototype.relation = ""; + + /** + * NameMappingValue attribute. + * @member {string} attribute + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance */ - ObjectNameMapping.prototype.target = null; + NameMappingValue.prototype.attribute = ""; /** - * Creates a new ObjectNameMapping instance using the specified properties. + * Creates a new NameMappingValue instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance */ - ObjectNameMapping.create = function create(properties) { - return new ObjectNameMapping(properties); + NameMappingValue.create = function create(properties) { + return new NameMappingValue(properties); }; /** - * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encode = function encode(message, writer) { + NameMappingValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.bigquery.migration.v2.NameMappingKey.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.bigquery.migration.v2.NameMappingValue.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attribute); return writer; }; /** - * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer. + * Decodes a NameMappingValue message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMapping.decode = function decode(reader, length, error) { + NameMappingValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); + message.database = reader.string(); break; } case 2: { - message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); + message.schema = reader.string(); + break; + } + case 3: { + message.relation = reader.string(); + break; + } + case 4: { + message.attribute = reader.string(); break; } default: @@ -8835,145 +10072,150 @@ }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMapping.decodeDelimited = function decodeDelimited(reader) { + NameMappingValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMapping message. + * Verifies a NameMappingValue message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectNameMapping.verify = function verify(message) { + NameMappingValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.bigquery.migration.v2.NameMappingKey.verify(message.source); - if (error) - return "source." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.bigquery.migration.v2.NameMappingValue.verify(message.target); - if (error) - return "target." + error; - } + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; return null; }; /** - * Creates an ObjectNameMapping message from a plain object. Also converts values to their respective internal types. + * Creates a NameMappingValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue */ - ObjectNameMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) + NameMappingValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.source: object expected"); - message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.fromObject(object.source); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.target: object expected"); - message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.fromObject(object.target); - } + var message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.relation != null) + message.relation = String(object.relation); + if (object.attribute != null) + message.attribute = String(object.attribute); return message; }; /** - * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. + * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping + * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMapping.toObject = function toObject(message, options) { + NameMappingValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.source = null; - object.target = null; + object.database = ""; + object.schema = ""; + object.relation = ""; + object.attribute = ""; } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.toObject(message.target, options); + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.relation != null && message.hasOwnProperty("relation")) + object.relation = message.relation; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; return object; }; /** - * Converts this ObjectNameMapping to JSON. + * Converts this NameMappingValue to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance * @returns {Object.} JSON object */ - ObjectNameMapping.prototype.toJSON = function toJSON() { + NameMappingValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ObjectNameMapping + * Gets the default type url for NameMappingValue * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; }; - return ObjectNameMapping; + return NameMappingValue; })(); - v2.NameMappingKey = (function() { + v2.SourceEnv = (function() { /** - * Properties of a NameMappingKey. + * Properties of a SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @interface INameMappingKey - * @property {google.cloud.bigquery.migration.v2.NameMappingKey.Type|null} [type] NameMappingKey type - * @property {string|null} [database] NameMappingKey database - * @property {string|null} [schema] NameMappingKey schema - * @property {string|null} [relation] NameMappingKey relation - * @property {string|null} [attribute] NameMappingKey attribute + * @interface ISourceEnv + * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset */ /** - * Constructs a new NameMappingKey. + * Constructs a new SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingKey. - * @implements INameMappingKey + * @classdesc Represents a SourceEnv. + * @implements ISourceEnv * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set */ - function NameMappingKey(properties) { + function SourceEnv(properties) { + this.schemaSearchPath = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8981,133 +10223,108 @@ } /** - * NameMappingKey type. - * @member {google.cloud.bigquery.migration.v2.NameMappingKey.Type} type - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @instance - */ - NameMappingKey.prototype.type = 0; - - /** - * NameMappingKey database. - * @member {string} database - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @instance - */ - NameMappingKey.prototype.database = ""; - - /** - * NameMappingKey schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.schema = ""; + SourceEnv.prototype.defaultDatabase = ""; /** - * NameMappingKey relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv schemaSearchPath. + * @member {Array.} schemaSearchPath + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.relation = ""; + SourceEnv.prototype.schemaSearchPath = $util.emptyArray; /** - * NameMappingKey attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv metadataStoreDataset. + * @member {string} metadataStoreDataset + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.attribute = ""; + SourceEnv.prototype.metadataStoreDataset = ""; /** - * Creates a new NameMappingKey instance using the specified properties. + * Creates a new SourceEnv instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance */ - NameMappingKey.create = function create(properties) { - return new NameMappingKey(properties); + SourceEnv.create = function create(properties) { + return new SourceEnv(properties); }; /** - * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encode = function encode(message, writer) { + SourceEnv.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.database); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); - if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.relation); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.attribute); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.schemaSearchPath != null && message.schemaSearchPath.length) + for (var i = 0; i < message.schemaSearchPath.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaSearchPath[i]); + if (message.metadataStoreDataset != null && Object.hasOwnProperty.call(message, "metadataStoreDataset")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataStoreDataset); return writer; }; /** - * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { + SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingKey message from the specified reader or buffer. + * Decodes a SourceEnv message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingKey.decode = function decode(reader, length, error) { + SourceEnv.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.defaultDatabase = reader.string(); break; } case 2: { - message.database = reader.string(); + if (!(message.schemaSearchPath && message.schemaSearchPath.length)) + message.schemaSearchPath = []; + message.schemaSearchPath.push(reader.string()); break; } case 3: { - message.schema = reader.string(); - break; - } - case 4: { - message.relation = reader.string(); - break; - } - case 5: { - message.attribute = reader.string(); + message.metadataStoreDataset = reader.string(); break; } default: @@ -9119,233 +10336,160 @@ }; /** - * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * Decodes a SourceEnv message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingKey.decodeDelimited = function decodeDelimited(reader) { + SourceEnv.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingKey message. + * Verifies a SourceEnv message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NameMappingKey.verify = function verify(message) { + SourceEnv.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.relation != null && message.hasOwnProperty("relation")) - if (!$util.isString(message.relation)) - return "relation: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.schemaSearchPath != null && message.hasOwnProperty("schemaSearchPath")) { + if (!Array.isArray(message.schemaSearchPath)) + return "schemaSearchPath: array expected"; + for (var i = 0; i < message.schemaSearchPath.length; ++i) + if (!$util.isString(message.schemaSearchPath[i])) + return "schemaSearchPath: string[] expected"; + } + if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + if (!$util.isString(message.metadataStoreDataset)) + return "metadataStoreDataset: string expected"; return null; }; /** - * Creates a NameMappingKey message from a plain object. Also converts values to their respective internal types. + * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv */ - NameMappingKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) + SourceEnv.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) return object; - var message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATABASE": - case 1: - message.type = 1; - break; - case "SCHEMA": - case 2: - message.type = 2; - break; - case "RELATION": - case 3: - message.type = 3; - break; - case "ATTRIBUTE": - case 4: - message.type = 4; - break; - case "RELATION_ALIAS": - case 5: - message.type = 5; - break; - case "ATTRIBUTE_ALIAS": - case 6: - message.type = 6; - break; - case "FUNCTION": - case 7: - message.type = 7; - break; + var message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.schemaSearchPath) { + if (!Array.isArray(object.schemaSearchPath)) + throw TypeError(".google.cloud.bigquery.migration.v2.SourceEnv.schemaSearchPath: array expected"); + message.schemaSearchPath = []; + for (var i = 0; i < object.schemaSearchPath.length; ++i) + message.schemaSearchPath[i] = String(object.schemaSearchPath[i]); } - if (object.database != null) - message.database = String(object.database); - if (object.schema != null) - message.schema = String(object.schema); - if (object.relation != null) - message.relation = String(object.relation); - if (object.attribute != null) - message.attribute = String(object.attribute); + if (object.metadataStoreDataset != null) + message.metadataStoreDataset = String(object.metadataStoreDataset); return message; }; /** - * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. + * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey + * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingKey.toObject = function toObject(message, options) { + SourceEnv.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.schemaSearchPath = []; if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + object.defaultDatabase = ""; + object.metadataStoreDataset = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] === undefined ? message.type : $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] : message.type; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.relation != null && message.hasOwnProperty("relation")) - object.relation = message.relation; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.schemaSearchPath && message.schemaSearchPath.length) { + object.schemaSearchPath = []; + for (var j = 0; j < message.schemaSearchPath.length; ++j) + object.schemaSearchPath[j] = message.schemaSearchPath[j]; + } + if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + object.metadataStoreDataset = message.metadataStoreDataset; return object; }; /** - * Converts this NameMappingKey to JSON. + * Converts this SourceEnv to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance * @returns {Object.} JSON object */ - NameMappingKey.prototype.toJSON = function toJSON() { + SourceEnv.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NameMappingKey + * Gets the default type url for SourceEnv * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; - }; - - /** - * Type enum. - * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} DATABASE=1 DATABASE value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} RELATION=3 RELATION value - * @property {number} ATTRIBUTE=4 ATTRIBUTE value - * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value - * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value - * @property {number} FUNCTION=7 FUNCTION value - */ - NameMappingKey.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATABASE"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[3] = "RELATION"] = 3; - values[valuesById[4] = "ATTRIBUTE"] = 4; - values[valuesById[5] = "RELATION_ALIAS"] = 5; - values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; - values[valuesById[7] = "FUNCTION"] = 7; - return values; - })(); + SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; + }; - return NameMappingKey; + return SourceEnv; })(); - v2.NameMappingValue = (function() { + v2.TranslationDetails = (function() { /** - * Properties of a NameMappingValue. + * Properties of a TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @interface INameMappingValue - * @property {string|null} [database] NameMappingValue database - * @property {string|null} [schema] NameMappingValue schema - * @property {string|null} [relation] NameMappingValue relation - * @property {string|null} [attribute] NameMappingValue attribute + * @interface ITranslationDetails + * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping + * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri + * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment + * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals + * @property {Array.|null} [targetTypes] TranslationDetails targetTypes + * @property {google.cloud.bigquery.migration.v2.ISuggestionConfig|null} [suggestionConfig] TranslationDetails suggestionConfig */ /** - * Constructs a new NameMappingValue. + * Constructs a new TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingValue. - * @implements INameMappingValue + * @classdesc Represents a TranslationDetails. + * @implements ITranslationDetails * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set */ - function NameMappingValue(properties) { + function TranslationDetails(properties) { + this.sourceTargetMapping = []; + this.targetReturnLiterals = []; + this.targetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9353,119 +10497,156 @@ } /** - * NameMappingValue database. - * @member {string} database - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails sourceTargetMapping. + * @member {Array.} sourceTargetMapping + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.database = ""; + TranslationDetails.prototype.sourceTargetMapping = $util.emptyArray; /** - * NameMappingValue schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails targetBaseUri. + * @member {string} targetBaseUri + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.schema = ""; + TranslationDetails.prototype.targetBaseUri = ""; /** - * NameMappingValue relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails sourceEnvironment. + * @member {google.cloud.bigquery.migration.v2.ISourceEnvironment|null|undefined} sourceEnvironment + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.relation = ""; + TranslationDetails.prototype.sourceEnvironment = null; /** - * NameMappingValue attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails targetReturnLiterals. + * @member {Array.} targetReturnLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.attribute = ""; + TranslationDetails.prototype.targetReturnLiterals = $util.emptyArray; /** - * Creates a new NameMappingValue instance using the specified properties. + * TranslationDetails targetTypes. + * @member {Array.} targetTypes + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.targetTypes = $util.emptyArray; + + /** + * TranslationDetails suggestionConfig. + * @member {google.cloud.bigquery.migration.v2.ISuggestionConfig|null|undefined} suggestionConfig + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.suggestionConfig = null; + + /** + * Creates a new TranslationDetails instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance */ - NameMappingValue.create = function create(properties) { - return new NameMappingValue(properties); + TranslationDetails.create = function create(properties) { + return new TranslationDetails(properties); }; /** - * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * Encodes the specified TranslationDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingValue.encode = function encode(message, writer) { + TranslationDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); - if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.attribute); + if (message.sourceTargetMapping != null && message.sourceTargetMapping.length) + for (var i = 0; i < message.sourceTargetMapping.length; ++i) + $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.encode(message.sourceTargetMapping[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetBaseUri != null && Object.hasOwnProperty.call(message, "targetBaseUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetBaseUri); + if (message.sourceEnvironment != null && Object.hasOwnProperty.call(message, "sourceEnvironment")) + $root.google.cloud.bigquery.migration.v2.SourceEnvironment.encode(message.sourceEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetReturnLiterals != null && message.targetReturnLiterals.length) + for (var i = 0; i < message.targetReturnLiterals.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetReturnLiterals[i]); + if (message.targetTypes != null && message.targetTypes.length) + for (var i = 0; i < message.targetTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetTypes[i]); + if (message.suggestionConfig != null && Object.hasOwnProperty.call(message, "suggestionConfig")) + $root.google.cloud.bigquery.migration.v2.SuggestionConfig.encode(message.suggestionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * Encodes the specified TranslationDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { + TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingValue message from the specified reader or buffer. + * Decodes a TranslationDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingValue.decode = function decode(reader, length, error) { + TranslationDetails.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.database = reader.string(); + if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) + message.sourceTargetMapping = []; + message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); break; } case 2: { - message.schema = reader.string(); + message.targetBaseUri = reader.string(); break; } case 3: { - message.relation = reader.string(); + message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.decode(reader, reader.uint32()); break; } case 4: { - message.attribute = reader.string(); + if (!(message.targetReturnLiterals && message.targetReturnLiterals.length)) + message.targetReturnLiterals = []; + message.targetReturnLiterals.push(reader.string()); + break; + } + case 5: { + if (!(message.targetTypes && message.targetTypes.length)) + message.targetTypes = []; + message.targetTypes.push(reader.string()); + break; + } + case 6: { + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.decode(reader, reader.uint32()); break; } default: @@ -9477,150 +10658,217 @@ }; /** - * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingValue.decodeDelimited = function decodeDelimited(reader) { + TranslationDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingValue message. + * Verifies a TranslationDetails message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NameMappingValue.verify = function verify(message) { + TranslationDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.relation != null && message.hasOwnProperty("relation")) - if (!$util.isString(message.relation)) - return "relation: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; + if (message.sourceTargetMapping != null && message.hasOwnProperty("sourceTargetMapping")) { + if (!Array.isArray(message.sourceTargetMapping)) + return "sourceTargetMapping: array expected"; + for (var i = 0; i < message.sourceTargetMapping.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.verify(message.sourceTargetMapping[i]); + if (error) + return "sourceTargetMapping." + error; + } + } + if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) + if (!$util.isString(message.targetBaseUri)) + return "targetBaseUri: string expected"; + if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) { + var error = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.verify(message.sourceEnvironment); + if (error) + return "sourceEnvironment." + error; + } + if (message.targetReturnLiterals != null && message.hasOwnProperty("targetReturnLiterals")) { + if (!Array.isArray(message.targetReturnLiterals)) + return "targetReturnLiterals: array expected"; + for (var i = 0; i < message.targetReturnLiterals.length; ++i) + if (!$util.isString(message.targetReturnLiterals[i])) + return "targetReturnLiterals: string[] expected"; + } + if (message.targetTypes != null && message.hasOwnProperty("targetTypes")) { + if (!Array.isArray(message.targetTypes)) + return "targetTypes: array expected"; + for (var i = 0; i < message.targetTypes.length; ++i) + if (!$util.isString(message.targetTypes[i])) + return "targetTypes: string[] expected"; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.verify(message.suggestionConfig); + if (error) + return "suggestionConfig." + error; + } return null; }; /** - * Creates a NameMappingValue message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails */ - NameMappingValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) + TranslationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) return object; - var message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); - if (object.database != null) - message.database = String(object.database); - if (object.schema != null) - message.schema = String(object.schema); - if (object.relation != null) - message.relation = String(object.relation); - if (object.attribute != null) - message.attribute = String(object.attribute); + var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + if (object.sourceTargetMapping) { + if (!Array.isArray(object.sourceTargetMapping)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); + message.sourceTargetMapping = []; + for (var i = 0; i < object.sourceTargetMapping.length; ++i) { + if (typeof object.sourceTargetMapping[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); + message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); + } + } + if (object.targetBaseUri != null) + message.targetBaseUri = String(object.targetBaseUri); + if (object.sourceEnvironment != null) { + if (typeof object.sourceEnvironment !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); + message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); + } + if (object.targetReturnLiterals) { + if (!Array.isArray(object.targetReturnLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); + message.targetReturnLiterals = []; + for (var i = 0; i < object.targetReturnLiterals.length; ++i) + message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); + } + if (object.targetTypes) { + if (!Array.isArray(object.targetTypes)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); + message.targetTypes = []; + for (var i = 0; i < object.targetTypes.length; ++i) + message.targetTypes[i] = String(object.targetTypes[i]); + } + if (object.suggestionConfig != null) { + if (typeof object.suggestionConfig !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.suggestionConfig: object expected"); + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.fromObject(object.suggestionConfig); + } return message; }; /** - * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. + * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue + * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingValue.toObject = function toObject(message, options) { + TranslationDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.sourceTargetMapping = []; + object.targetReturnLiterals = []; + object.targetTypes = []; + } if (options.defaults) { - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + object.targetBaseUri = ""; + object.sourceEnvironment = null; + object.suggestionConfig = null; } - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.relation != null && message.hasOwnProperty("relation")) - object.relation = message.relation; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; + if (message.sourceTargetMapping && message.sourceTargetMapping.length) { + object.sourceTargetMapping = []; + for (var j = 0; j < message.sourceTargetMapping.length; ++j) + object.sourceTargetMapping[j] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.toObject(message.sourceTargetMapping[j], options); + } + if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) + object.targetBaseUri = message.targetBaseUri; + if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) + object.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.toObject(message.sourceEnvironment, options); + if (message.targetReturnLiterals && message.targetReturnLiterals.length) { + object.targetReturnLiterals = []; + for (var j = 0; j < message.targetReturnLiterals.length; ++j) + object.targetReturnLiterals[j] = message.targetReturnLiterals[j]; + } + if (message.targetTypes && message.targetTypes.length) { + object.targetTypes = []; + for (var j = 0; j < message.targetTypes.length; ++j) + object.targetTypes[j] = message.targetTypes[j]; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) + object.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.toObject(message.suggestionConfig, options); return object; }; /** - * Converts this NameMappingValue to JSON. + * Converts this TranslationDetails to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance * @returns {Object.} JSON object */ - NameMappingValue.prototype.toJSON = function toJSON() { + TranslationDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NameMappingValue + * Gets the default type url for TranslationDetails * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; }; - return NameMappingValue; + return TranslationDetails; })(); - v2.SourceEnv = (function() { + v2.SuggestionConfig = (function() { /** - * Properties of a SourceEnv. + * Properties of a SuggestionConfig. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceEnv - * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase - * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath - * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset + * @interface ISuggestionConfig + * @property {Array.|null} [skipSuggestionSteps] SuggestionConfig skipSuggestionSteps */ /** - * Constructs a new SourceEnv. + * Constructs a new SuggestionConfig. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceEnv. - * @implements ISourceEnv + * @classdesc Represents a SuggestionConfig. + * @implements ISuggestionConfig * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set */ - function SourceEnv(properties) { - this.schemaSearchPath = []; + function SuggestionConfig(properties) { + this.skipSuggestionSteps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9628,108 +10876,80 @@ } /** - * SourceEnv defaultDatabase. - * @member {string} defaultDatabase - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @instance - */ - SourceEnv.prototype.defaultDatabase = ""; - - /** - * SourceEnv schemaSearchPath. - * @member {Array.} schemaSearchPath - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @instance - */ - SourceEnv.prototype.schemaSearchPath = $util.emptyArray; - - /** - * SourceEnv metadataStoreDataset. - * @member {string} metadataStoreDataset - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * SuggestionConfig skipSuggestionSteps. + * @member {Array.} skipSuggestionSteps + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @instance */ - SourceEnv.prototype.metadataStoreDataset = ""; + SuggestionConfig.prototype.skipSuggestionSteps = $util.emptyArray; /** - * Creates a new SourceEnv instance using the specified properties. + * Creates a new SuggestionConfig instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig instance */ - SourceEnv.create = function create(properties) { - return new SourceEnv(properties); + SuggestionConfig.create = function create(properties) { + return new SuggestionConfig(properties); }; /** - * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encode = function encode(message, writer) { + SuggestionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); - if (message.schemaSearchPath != null && message.schemaSearchPath.length) - for (var i = 0; i < message.schemaSearchPath.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaSearchPath[i]); - if (message.metadataStoreDataset != null && Object.hasOwnProperty.call(message, "metadataStoreDataset")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataStoreDataset); + if (message.skipSuggestionSteps != null && message.skipSuggestionSteps.length) + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) + $root.google.cloud.bigquery.migration.v2.SuggestionStep.encode(message.skipSuggestionSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceEnv message from the specified reader or buffer. + * Decodes a SuggestionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceEnv.decode = function decode(reader, length, error) { + SuggestionConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.defaultDatabase = reader.string(); - break; - } - case 2: { - if (!(message.schemaSearchPath && message.schemaSearchPath.length)) - message.schemaSearchPath = []; - message.schemaSearchPath.push(reader.string()); - break; - } - case 3: { - message.metadataStoreDataset = reader.string(); + if (!(message.skipSuggestionSteps && message.skipSuggestionSteps.length)) + message.skipSuggestionSteps = []; + message.skipSuggestionSteps.push($root.google.cloud.bigquery.migration.v2.SuggestionStep.decode(reader, reader.uint32())); break; } default: @@ -9741,302 +10961,232 @@ }; /** - * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceEnv.decodeDelimited = function decodeDelimited(reader) { + SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceEnv message. + * Verifies a SuggestionConfig message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceEnv.verify = function verify(message) { + SuggestionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) - if (!$util.isString(message.defaultDatabase)) - return "defaultDatabase: string expected"; - if (message.schemaSearchPath != null && message.hasOwnProperty("schemaSearchPath")) { - if (!Array.isArray(message.schemaSearchPath)) - return "schemaSearchPath: array expected"; - for (var i = 0; i < message.schemaSearchPath.length; ++i) - if (!$util.isString(message.schemaSearchPath[i])) - return "schemaSearchPath: string[] expected"; + if (message.skipSuggestionSteps != null && message.hasOwnProperty("skipSuggestionSteps")) { + if (!Array.isArray(message.skipSuggestionSteps)) + return "skipSuggestionSteps: array expected"; + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionStep.verify(message.skipSuggestionSteps[i]); + if (error) + return "skipSuggestionSteps." + error; + } } - if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) - if (!$util.isString(message.metadataStoreDataset)) - return "metadataStoreDataset: string expected"; return null; }; /** - * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig */ - SourceEnv.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) + SuggestionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionConfig) return object; - var message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); - if (object.defaultDatabase != null) - message.defaultDatabase = String(object.defaultDatabase); - if (object.schemaSearchPath) { - if (!Array.isArray(object.schemaSearchPath)) - throw TypeError(".google.cloud.bigquery.migration.v2.SourceEnv.schemaSearchPath: array expected"); - message.schemaSearchPath = []; - for (var i = 0; i < object.schemaSearchPath.length; ++i) - message.schemaSearchPath[i] = String(object.schemaSearchPath[i]); + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); + if (object.skipSuggestionSteps) { + if (!Array.isArray(object.skipSuggestionSteps)) + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: array expected"); + message.skipSuggestionSteps = []; + for (var i = 0; i < object.skipSuggestionSteps.length; ++i) { + if (typeof object.skipSuggestionSteps[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: object expected"); + message.skipSuggestionSteps[i] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.fromObject(object.skipSuggestionSteps[i]); + } } - if (object.metadataStoreDataset != null) - message.metadataStoreDataset = String(object.metadataStoreDataset); return message; }; /** - * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv + * @param {google.cloud.bigquery.migration.v2.SuggestionConfig} message SuggestionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceEnv.toObject = function toObject(message, options) { + SuggestionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.schemaSearchPath = []; - if (options.defaults) { - object.defaultDatabase = ""; - object.metadataStoreDataset = ""; + object.skipSuggestionSteps = []; + if (message.skipSuggestionSteps && message.skipSuggestionSteps.length) { + object.skipSuggestionSteps = []; + for (var j = 0; j < message.skipSuggestionSteps.length; ++j) + object.skipSuggestionSteps[j] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.toObject(message.skipSuggestionSteps[j], options); } - if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) - object.defaultDatabase = message.defaultDatabase; - if (message.schemaSearchPath && message.schemaSearchPath.length) { - object.schemaSearchPath = []; - for (var j = 0; j < message.schemaSearchPath.length; ++j) - object.schemaSearchPath[j] = message.schemaSearchPath[j]; - } - if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) - object.metadataStoreDataset = message.metadataStoreDataset; return object; }; /** - * Converts this SourceEnv to JSON. + * Converts this SuggestionConfig to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @instance * @returns {Object.} JSON object */ - SourceEnv.prototype.toJSON = function toJSON() { + SuggestionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceEnv + * Gets the default type url for SuggestionConfig * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; - }; - - return SourceEnv; - })(); - - v2.TranslationDetails = (function() { - - /** - * Properties of a TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationDetails - * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping - * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri - * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment - * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals - * @property {Array.|null} [targetTypes] TranslationDetails targetTypes - */ - - /** - * Constructs a new TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationDetails. - * @implements ITranslationDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - */ - function TranslationDetails(properties) { - this.sourceTargetMapping = []; - this.targetReturnLiterals = []; - this.targetTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TranslationDetails sourceTargetMapping. - * @member {Array.} sourceTargetMapping - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - TranslationDetails.prototype.sourceTargetMapping = $util.emptyArray; + SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionConfig"; + }; + + return SuggestionConfig; + })(); + + v2.SuggestionStep = (function() { /** - * TranslationDetails targetBaseUri. - * @member {string} targetBaseUri - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * Properties of a SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISuggestionStep + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null} [suggestionType] SuggestionStep suggestionType + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null} [rewriteTarget] SuggestionStep rewriteTarget */ - TranslationDetails.prototype.targetBaseUri = ""; /** - * TranslationDetails sourceEnvironment. - * @member {google.cloud.bigquery.migration.v2.ISourceEnvironment|null|undefined} sourceEnvironment - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * Constructs a new SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SuggestionStep. + * @implements ISuggestionStep + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set */ - TranslationDetails.prototype.sourceEnvironment = null; + function SuggestionStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * TranslationDetails targetReturnLiterals. - * @member {Array.} targetReturnLiterals - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * SuggestionStep suggestionType. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType} suggestionType + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance */ - TranslationDetails.prototype.targetReturnLiterals = $util.emptyArray; + SuggestionStep.prototype.suggestionType = 0; /** - * TranslationDetails targetTypes. - * @member {Array.} targetTypes - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * SuggestionStep rewriteTarget. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget} rewriteTarget + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance */ - TranslationDetails.prototype.targetTypes = $util.emptyArray; + SuggestionStep.prototype.rewriteTarget = 0; /** - * Creates a new TranslationDetails instance using the specified properties. + * Creates a new SuggestionStep instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep instance */ - TranslationDetails.create = function create(properties) { - return new TranslationDetails(properties); + SuggestionStep.create = function create(properties) { + return new SuggestionStep(properties); }; /** - * Encodes the specified TranslationDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDetails.encode = function encode(message, writer) { + SuggestionStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceTargetMapping != null && message.sourceTargetMapping.length) - for (var i = 0; i < message.sourceTargetMapping.length; ++i) - $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.encode(message.sourceTargetMapping[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.targetBaseUri != null && Object.hasOwnProperty.call(message, "targetBaseUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetBaseUri); - if (message.sourceEnvironment != null && Object.hasOwnProperty.call(message, "sourceEnvironment")) - $root.google.cloud.bigquery.migration.v2.SourceEnvironment.encode(message.sourceEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetReturnLiterals != null && message.targetReturnLiterals.length) - for (var i = 0; i < message.targetReturnLiterals.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetReturnLiterals[i]); - if (message.targetTypes != null && message.targetTypes.length) - for (var i = 0; i < message.targetTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetTypes[i]); + if (message.suggestionType != null && Object.hasOwnProperty.call(message, "suggestionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.suggestionType); + if (message.rewriteTarget != null && Object.hasOwnProperty.call(message, "rewriteTarget")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rewriteTarget); return writer; }; /** - * Encodes the specified TranslationDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationDetails message from the specified reader or buffer. + * Decodes a SuggestionStep message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDetails.decode = function decode(reader, length, error) { + SuggestionStep.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) - message.sourceTargetMapping = []; - message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); + message.suggestionType = reader.int32(); break; } case 2: { - message.targetBaseUri = reader.string(); - break; - } - case 3: { - message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.targetReturnLiterals && message.targetReturnLiterals.length)) - message.targetReturnLiterals = []; - message.targetReturnLiterals.push(reader.string()); - break; - } - case 5: { - if (!(message.targetTypes && message.targetTypes.length)) - message.targetTypes = []; - message.targetTypes.push(reader.string()); + message.rewriteTarget = reader.int32(); break; } default: @@ -10048,183 +11198,191 @@ }; /** - * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDetails.decodeDelimited = function decodeDelimited(reader) { + SuggestionStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationDetails message. + * Verifies a SuggestionStep message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationDetails.verify = function verify(message) { + SuggestionStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sourceTargetMapping != null && message.hasOwnProperty("sourceTargetMapping")) { - if (!Array.isArray(message.sourceTargetMapping)) - return "sourceTargetMapping: array expected"; - for (var i = 0; i < message.sourceTargetMapping.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.verify(message.sourceTargetMapping[i]); - if (error) - return "sourceTargetMapping." + error; + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + switch (message.suggestionType) { + default: + return "suggestionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + switch (message.rewriteTarget) { + default: + return "rewriteTarget: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) - if (!$util.isString(message.targetBaseUri)) - return "targetBaseUri: string expected"; - if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) { - var error = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.verify(message.sourceEnvironment); - if (error) - return "sourceEnvironment." + error; - } - if (message.targetReturnLiterals != null && message.hasOwnProperty("targetReturnLiterals")) { - if (!Array.isArray(message.targetReturnLiterals)) - return "targetReturnLiterals: array expected"; - for (var i = 0; i < message.targetReturnLiterals.length; ++i) - if (!$util.isString(message.targetReturnLiterals[i])) - return "targetReturnLiterals: string[] expected"; - } - if (message.targetTypes != null && message.hasOwnProperty("targetTypes")) { - if (!Array.isArray(message.targetTypes)) - return "targetTypes: array expected"; - for (var i = 0; i < message.targetTypes.length; ++i) - if (!$util.isString(message.targetTypes[i])) - return "targetTypes: string[] expected"; - } return null; }; /** - * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep */ - TranslationDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) + SuggestionStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionStep) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); - if (object.sourceTargetMapping) { - if (!Array.isArray(object.sourceTargetMapping)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); - message.sourceTargetMapping = []; - for (var i = 0; i < object.sourceTargetMapping.length; ++i) { - if (typeof object.sourceTargetMapping[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); - message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); + switch (object.suggestionType) { + default: + if (typeof object.suggestionType === "number") { + message.suggestionType = object.suggestionType; + break; } + break; + case "SUGGESTION_TYPE_UNSPECIFIED": + case 0: + message.suggestionType = 0; + break; + case "QUERY_CUSTOMIZATION": + case 1: + message.suggestionType = 1; + break; + case "TRANSLATION_EXPLANATION": + case 2: + message.suggestionType = 2; + break; } - if (object.targetBaseUri != null) - message.targetBaseUri = String(object.targetBaseUri); - if (object.sourceEnvironment != null) { - if (typeof object.sourceEnvironment !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); - message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); - } - if (object.targetReturnLiterals) { - if (!Array.isArray(object.targetReturnLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); - message.targetReturnLiterals = []; - for (var i = 0; i < object.targetReturnLiterals.length; ++i) - message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); - } - if (object.targetTypes) { - if (!Array.isArray(object.targetTypes)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); - message.targetTypes = []; - for (var i = 0; i < object.targetTypes.length; ++i) - message.targetTypes[i] = String(object.targetTypes[i]); + switch (object.rewriteTarget) { + default: + if (typeof object.rewriteTarget === "number") { + message.rewriteTarget = object.rewriteTarget; + break; + } + break; + case "REWRITE_TARGET_UNSPECIFIED": + case 0: + message.rewriteTarget = 0; + break; + case "SOURCE_SQL": + case 1: + message.rewriteTarget = 1; + break; + case "TARGET_SQL": + case 2: + message.rewriteTarget = 2; + break; } return message; }; /** - * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails + * @param {google.cloud.bigquery.migration.v2.SuggestionStep} message SuggestionStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationDetails.toObject = function toObject(message, options) { + SuggestionStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sourceTargetMapping = []; - object.targetReturnLiterals = []; - object.targetTypes = []; - } if (options.defaults) { - object.targetBaseUri = ""; - object.sourceEnvironment = null; - } - if (message.sourceTargetMapping && message.sourceTargetMapping.length) { - object.sourceTargetMapping = []; - for (var j = 0; j < message.sourceTargetMapping.length; ++j) - object.sourceTargetMapping[j] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.toObject(message.sourceTargetMapping[j], options); - } - if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) - object.targetBaseUri = message.targetBaseUri; - if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) - object.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.toObject(message.sourceEnvironment, options); - if (message.targetReturnLiterals && message.targetReturnLiterals.length) { - object.targetReturnLiterals = []; - for (var j = 0; j < message.targetReturnLiterals.length; ++j) - object.targetReturnLiterals[j] = message.targetReturnLiterals[j]; - } - if (message.targetTypes && message.targetTypes.length) { - object.targetTypes = []; - for (var j = 0; j < message.targetTypes.length; ++j) - object.targetTypes[j] = message.targetTypes[j]; + object.suggestionType = options.enums === String ? "SUGGESTION_TYPE_UNSPECIFIED" : 0; + object.rewriteTarget = options.enums === String ? "REWRITE_TARGET_UNSPECIFIED" : 0; } + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + object.suggestionType = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] === undefined ? message.suggestionType : $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] : message.suggestionType; + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + object.rewriteTarget = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] === undefined ? message.rewriteTarget : $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] : message.rewriteTarget; return object; }; /** - * Converts this TranslationDetails to JSON. + * Converts this SuggestionStep to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance * @returns {Object.} JSON object */ - TranslationDetails.prototype.toJSON = function toJSON() { + SuggestionStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TranslationDetails + * Gets the default type url for SuggestionStep * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SuggestionStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionStep"; }; - return TranslationDetails; + /** + * SuggestionType enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType + * @enum {number} + * @property {number} SUGGESTION_TYPE_UNSPECIFIED=0 SUGGESTION_TYPE_UNSPECIFIED value + * @property {number} QUERY_CUSTOMIZATION=1 QUERY_CUSTOMIZATION value + * @property {number} TRANSLATION_EXPLANATION=2 TRANSLATION_EXPLANATION value + */ + SuggestionStep.SuggestionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUGGESTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUERY_CUSTOMIZATION"] = 1; + values[valuesById[2] = "TRANSLATION_EXPLANATION"] = 2; + return values; + })(); + + /** + * RewriteTarget enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget + * @enum {number} + * @property {number} REWRITE_TARGET_UNSPECIFIED=0 REWRITE_TARGET_UNSPECIFIED value + * @property {number} SOURCE_SQL=1 SOURCE_SQL value + * @property {number} TARGET_SQL=2 TARGET_SQL value + */ + SuggestionStep.RewriteTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REWRITE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE_SQL"] = 1; + values[valuesById[2] = "TARGET_SQL"] = 2; + return values; + })(); + + return SuggestionStep; })(); v2.SourceTargetMapping = (function() { @@ -10474,6 +11632,7 @@ * @interface ISourceSpec * @property {string|null} [baseUri] SourceSpec baseUri * @property {google.cloud.bigquery.migration.v2.ILiteral|null} [literal] SourceSpec literal + * @property {string|null} [gcsFilePath] SourceSpec gcsFilePath * @property {string|null} [encoding] SourceSpec encoding */ @@ -10508,6 +11667,14 @@ */ SourceSpec.prototype.literal = null; + /** + * SourceSpec gcsFilePath. + * @member {string|null|undefined} gcsFilePath + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.gcsFilePath = null; + /** * SourceSpec encoding. * @member {string} encoding @@ -10521,12 +11688,12 @@ /** * SourceSpec source. - * @member {"baseUri"|"literal"|undefined} source + * @member {"baseUri"|"literal"|"gcsFilePath"|undefined} source * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @instance */ Object.defineProperty(SourceSpec.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal"]), + get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal", "gcsFilePath"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10560,6 +11727,8 @@ $root.google.cloud.bigquery.migration.v2.Literal.encode(message.literal, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.gcsFilePath != null && Object.hasOwnProperty.call(message, "gcsFilePath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsFilePath); return writer; }; @@ -10604,6 +11773,10 @@ message.literal = $root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32()); break; } + case 4: { + message.gcsFilePath = reader.string(); + break; + } case 3: { message.encoding = reader.string(); break; @@ -10659,6 +11832,13 @@ return "literal." + error; } } + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsFilePath)) + return "gcsFilePath: string expected"; + } if (message.encoding != null && message.hasOwnProperty("encoding")) if (!$util.isString(message.encoding)) return "encoding: string expected"; @@ -10684,6 +11864,8 @@ throw TypeError(".google.cloud.bigquery.migration.v2.SourceSpec.literal: object expected"); message.literal = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.literal); } + if (object.gcsFilePath != null) + message.gcsFilePath = String(object.gcsFilePath); if (object.encoding != null) message.encoding = String(object.encoding); return message; @@ -10716,6 +11898,11 @@ } if (message.encoding != null && message.hasOwnProperty("encoding")) object.encoding = message.encoding; + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + object.gcsFilePath = message.gcsFilePath; + if (options.oneofs) + object.source = "gcsFilePath"; + } return object; }; diff --git a/packages/google-cloud-bigquery-migration/protos/protos.json b/packages/google-cloud-bigquery-migration/protos/protos.json index a87e79928823..47c7fc1c94c6 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.json +++ b/packages/google-cloud-bigquery-migration/protos/protos.json @@ -18,6 +18,72 @@ "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2" }, "nested": { + "AssessmentTaskDetails": { + "oneofs": { + "_featureHandle": { + "oneof": [ + "featureHandle" + ] + } + }, + "fields": { + "inputPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputDataset": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "querylogsPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSource": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "featureHandle": { + "type": "AssessmentFeatureHandle", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AssessmentFeatureHandle": { + "oneofs": { + "_addShareableDataset": { + "oneof": [ + "addShareableDataset" + ] + } + }, + "fields": { + "addShareableDataset": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, "MigrationWorkflow": { "options": { "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", @@ -49,11 +115,17 @@ }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -72,12 +144,17 @@ "oneofs": { "taskDetails": { "oneof": [ + "assessmentTaskDetails", "translationConfigDetails", "translationDetails" ] } }, "fields": { + "assessmentTaskDetails": { + "type": "AssessmentTaskDetails", + "id": 12 + }, "translationConfigDetails": { "type": "TranslationConfigDetails", "id": 14 @@ -113,11 +190,17 @@ }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "resourceErrorDetails": { "rule": "repeated", @@ -129,12 +212,18 @@ }, "resourceErrorCount": { "type": "int32", - "id": 18 + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "metrics": { "rule": "repeated", "type": "TimeSeries", - "id": 19 + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "taskResult": { "type": "MigrationTaskResult", @@ -145,11 +234,17 @@ }, "totalProcessingErrorCount": { "type": "int32", - "id": 21 + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "totalResourceErrorCount": { "type": "int32", - "id": 22 + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -211,20 +306,32 @@ }, "resourceErrorCount": { "type": "int32", - "id": 13 + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "metrics": { "rule": "repeated", "type": "TimeSeries", - "id": 11 + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -267,6 +374,10 @@ "rule": "repeated", "type": "GcsReportLogMessage", "id": 2 + }, + "consoleUri": { + "type": "string", + "id": 3 } } }, @@ -767,6 +878,47 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "suggestionConfig": { + "type": "SuggestionConfig", + "id": 6 + } + } + }, + "SuggestionConfig": { + "fields": { + "skipSuggestionSteps": { + "rule": "repeated", + "type": "SuggestionStep", + "id": 1 + } + } + }, + "SuggestionStep": { + "fields": { + "suggestionType": { + "type": "SuggestionType", + "id": 1 + }, + "rewriteTarget": { + "type": "RewriteTarget", + "id": 2 + } + }, + "nested": { + "SuggestionType": { + "values": { + "SUGGESTION_TYPE_UNSPECIFIED": 0, + "QUERY_CUSTOMIZATION": 1, + "TRANSLATION_EXPLANATION": 2 + } + }, + "RewriteTarget": { + "values": { + "REWRITE_TARGET_UNSPECIFIED": 0, + "SOURCE_SQL": 1, + "TARGET_SQL": 2 + } } } }, @@ -787,7 +939,8 @@ "source": { "oneof": [ "baseUri", - "literal" + "literal", + "gcsFilePath" ] } }, @@ -800,6 +953,10 @@ "type": "Literal", "id": 2 }, + "gcsFilePath": { + "type": "string", + "id": 4 + }, "encoding": { "type": "string", "id": 3, diff --git a/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json b/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json index b8cc943ce510..7dc6828feb59 100644 --- a/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json +++ b/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/cloud/bigquery/migration/v2/assessment_task.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_entities.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_error_details.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_metrics.proto",