From 9bd3923bbac93975828f73b24efce9d513d6e201 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:59:10 -0500 Subject: [PATCH] feat: Update MS API stubs with Unified API (#5548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update MS API stubs with Unified API docs: A comment for field `name` in message `.google.cloud.bigquery.migration.v2.MigrationWorkflow` is changed to include 'Identifier' docs: A comment for field `translation_config_details` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is changed docs: A comment for field `type` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is changed to include new supported types PiperOrigin-RevId: 651876892 Source-Link: https://github.com/googleapis/googleapis/commit/aa3a96ba03db3c8f3cc123d8507350ae873e7f8f Source-Link: https://github.com/googleapis/googleapis-gen/commit/a939b7b34a5b35d4bf6b1b55a2574f7d93810ab6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiYTkzOWI3YjM0YTViMzVkNGJmNmIxYjU1YTI1NzRmN2Q5MzgxMGFiNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../migration/v2/migration_entities.proto | 59 +- .../migration/v2/translation_config.proto | 34 + .../migration/v2/translation_details.proto | 116 + .../migration/v2/translation_suggestion.proto | 63 + .../migration/v2/translation_usability.proto | 65 + .../protos/protos.d.ts | 1959 ++- .../protos/protos.js | 10105 +++++++++++----- .../protos/protos.json | 313 +- .../src/v2/migration_service_proto_list.json | 5 +- 9 files changed, 9327 insertions(+), 3392 deletions(-) create mode 100644 packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto create mode 100644 packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto create mode 100644 packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto 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 1772544bbd9..34422f0dc4e 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 @@ -21,6 +21,8 @@ import "google/api/resource.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"; +import "google/cloud/bigquery/migration/v2/translation_details.proto"; +import "google/cloud/bigquery/migration/v2/translation_usability.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/error_details.proto"; @@ -61,13 +63,14 @@ message MigrationWorkflow { COMPLETED = 4; } - // Output only. Immutable. The unique identifier for the migration workflow. - // The ID is server-generated. + // Output only. Immutable. Identifier. The unique identifier for the migration + // workflow. The ID is server-generated. // // Example: `projects/123/locations/us/workflows/345` string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER ]; // The display name of the workflow. This can be set to give a workflow @@ -119,8 +122,11 @@ message MigrationTask { // The details of the task. oneof task_details { - // Task configuration for Batch SQL Translation. + // Task configuration for CW Batch/Offline SQL Translation. TranslationConfigDetails translation_config_details = 14; + + // Task details for unified SQL Translation. + TranslationDetails translation_details = 16; } // Output only. Immutable. The unique identifier for the migration task. The @@ -136,7 +142,7 @@ message MigrationTask { // Translation_Snowflake2BQ, Translation_Netezza2BQ, // Translation_AzureSynapse2BQ, Translation_Vertica2BQ, // Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - // Translation_Postgresql2BQ. + // Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. string type = 2; // Output only. The current state of the task. @@ -152,6 +158,31 @@ message MigrationTask { // Time when the task was last updated. google.protobuf.Timestamp last_update_time = 7; + + // Output only. Provides details to errors and issues encountered while + // processing the task. Presence of error details does not mean that the task + // failed. + 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; + + // The metrics for the task. + repeated TimeSeries metrics = 19; + + // 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; + + // Count of all the resource errors in this task and its subtasks. + int32 total_resource_error_count = 22; } // A subtask for a migration which carries details about the configuration of @@ -236,3 +267,21 @@ message MigrationSubtask { // The metrics for the subtask. repeated TimeSeries metrics = 11; } + +// The migration task result. +message MigrationTaskResult { + // Details specific to the task type. + oneof details { + // Details specific to translation task types. + TranslationTaskResult translation_task_result = 2; + } +} + +// Translation specific result details from the migration task. +message TranslationTaskResult { + // The list of the translated literals. + repeated Literal translated_literals = 1; + + // The records from the aggregate CSV report for a migration workflow. + repeated GcsReportLogMessage report_log_messages = 2; +} 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 902f27cf249..a463a79f137 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 @@ -16,6 +16,8 @@ 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; @@ -56,6 +58,12 @@ message TranslationConfigDetails { // The indicator to show translation request initiator. string request_source = 8; + + // The types of output to generate, e.g. sql, metadata etc. If not specified, + // a default set of 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 = 9; } // The possible dialect options for translation. @@ -103,6 +111,15 @@ message Dialect { // The MySQL dialect MySQLDialect mysql_dialect = 14; + + // DB2 dialect + DB2Dialect db2_dialect = 15; + + // SQLite dialect + SQLiteDialect sqlite_dialect = 16; + + // Greenplum dialect + GreenplumDialect greenplum_dialect = 17; } } @@ -163,6 +180,15 @@ message PrestoDialect {} // The dialect definition for MySQL. message MySQLDialect {} +// The dialect definition for DB2. +message DB2Dialect {} + +// The dialect definition for SQLite. +message SQLiteDialect {} + +// The dialect definition for Greenplum. +message GreenplumDialect {} + // Represents a map of name mappings using a list of key:value proto messages of // existing name to desired output name. message ObjectNameMappingList { @@ -257,4 +283,12 @@ message SourceEnv { // The schema search path. When SQL objects are missing schema name, // translation engine will search through this list to find the value. repeated string schema_search_path = 2; + + // Optional. Expects a valid BigQuery dataset ID that exists, e.g., + // project-123.metadata_store_123. If specified, translation will search and + // read the required schema information from a metadata store in this dataset. + // If metadata store doesn't exist, translation will parse the metadata file + // and upload the schema info to a temp table in the dataset to speed up + // future translation jobs. + string metadata_store_dataset = 3 [(google.api.field_behavior) = OPTIONAL]; } 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 new file mode 100644 index 00000000000..3325adc71ac --- /dev/null +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto @@ -0,0 +1,116 @@ +// Copyright 2024 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 = "TranslationDetailsProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// The translation details to capture the necessary settings for a translation +// job. +message TranslationDetails { + // The mapping from source to target SQL. + repeated SourceTargetMapping source_target_mapping = 1; + + // The base URI for all writes to persistent storage. + string target_base_uri = 2; + + // The default source environment values for the translation. + SourceEnvironment source_environment = 3; + + // The list of literal targets that will be directly returned to the response. + // Each entry consists of the constructed path, EXCLUDING the base path. Not + // providing a target_base_uri will prevent writing to persistent storage. + repeated string target_return_literals = 4; + + // The types of output to generate, e.g. sql, metadata, + // lineage_from_sql_scripts, etc. If not specified, a default set of + // 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; +} + +// Represents one mapping from a source SQL to a target SQL. +message SourceTargetMapping { + // The source SQL or the path to it. + SourceSpec source_spec = 1; + + // The target SQL or the path for it. + TargetSpec target_spec = 2; +} + +// Represents one path to the location that holds source data. +message SourceSpec { + // The specific source SQL. + oneof source { + // The base URI for all files to be read in as sources for translation. + string base_uri = 1; + + // Source literal. + Literal literal = 2; + } + + // Optional. The optional field to specify the encoding of the sql bytes. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents one path to the location that holds target data. +message TargetSpec { + // The relative path for the target data. Given source file + // `base_uri/input/sql`, the output would be + // `target_base_uri/sql/relative_path/input.sql`. + string relative_path = 1; +} + +// Literal data. +message Literal { + // The literal SQL contents. + oneof literal_data { + // Literal string data. + string literal_string = 2; + + // Literal byte data. + bytes literal_bytes = 3; + } + + // Required. The identifier of the literal entry. + string relative_path = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the default source environment values for the translation. +message SourceEnvironment { + // The default database name to fully qualify SQL objects when their database + // name is missing. + string default_database = 1; + + // The schema search path. When SQL objects are missing schema name, + // translation engine will search through this list to find the value. + repeated string schema_search_path = 2; + + // Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + // project-123.metadata_store_123. If specified, translation will search and + // read the required schema information from a metadata store in this dataset. + // If metadata store doesn't exist, translation will parse the metadata file + // and upload the schema info to a temp table in the dataset to speed up + // future translation jobs. + string metadata_store_dataset = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto new file mode 100644 index 00000000000..7b78509e79d --- /dev/null +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto @@ -0,0 +1,63 @@ +// Copyright 2024 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"; +import "google/api/resource.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 = "TranslationSuggestionProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// Details about a record. +message TranslationReportRecord { + // The severity type of the record. + enum Severity { + // SeverityType not specified. + SEVERITY_UNSPECIFIED = 0; + + // INFO type. + INFO = 1; + + // WARNING type. The translated query may still provide useful information + // if all the report records are WARNING. + WARNING = 2; + + // ERROR type. Translation failed. + ERROR = 3; + } + + // Severity of the translation record. + Severity severity = 1; + + // Specifies the row from the source text where the error occurred (0 based). + // Example: 2 + int32 script_line = 2; + + // Specifies the column from the source texts where the error occurred. (0 + // based) example: 6 + int32 script_column = 3; + + // Category of the error/warning. Example: SyntaxError + string category = 4; + + // Detailed message of the record. + string message = 5; +} 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 new file mode 100644 index 00000000000..6f3e0ea2a25 --- /dev/null +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto @@ -0,0 +1,65 @@ +// Copyright 2024 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"; +import "google/api/resource.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 = "TranslationUsabilityProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// A record in the aggregate CSV report for a migration workflow +message GcsReportLogMessage { + // Severity of the translation record. + string severity = 1; + + // Category of the error/warning. Example: SyntaxError + string category = 2; + + // The file path in which the error occurred + string file_path = 3; + + // The file name in which the error occurred + string filename = 4; + + // Specifies the row from the source text where the error occurred (0 based, + // -1 for messages without line location). Example: 2 + int32 source_script_line = 5; + + // Specifies the column from the source texts where the error occurred. (0 + // based, -1 for messages without column location) example: 6 + int32 source_script_column = 6; + + // Detailed message of the record. + string message = 7; + + // The script context (obfuscated) in which the error occurred + string script_context = 8; + + // Category of the error/warning. Example: SyntaxError + string action = 9; + + // Effect of the error/warning. Example: COMPATIBILITY + string effect = 10; + + // Name of the affected object in the log message. + string object_name = 11; +} diff --git a/packages/google-cloud-bigquery-migration/protos/protos.d.ts b/packages/google-cloud-bigquery-migration/protos/protos.d.ts index 33ab1fa6ca1..a7082ebda8c 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-migration/protos/protos.d.ts @@ -174,6 +174,9 @@ export namespace google { /** MigrationTask translationConfigDetails */ translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); + /** MigrationTask translationDetails */ + translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); + /** MigrationTask id */ id?: (string|null); @@ -191,6 +194,24 @@ export namespace google { /** MigrationTask lastUpdateTime */ lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationTask resourceErrorDetails */ + resourceErrorDetails?: (google.cloud.bigquery.migration.v2.IResourceErrorDetail[]|null); + + /** MigrationTask resourceErrorCount */ + resourceErrorCount?: (number|null); + + /** MigrationTask metrics */ + metrics?: (google.cloud.bigquery.migration.v2.ITimeSeries[]|null); + + /** MigrationTask taskResult */ + taskResult?: (google.cloud.bigquery.migration.v2.IMigrationTaskResult|null); + + /** MigrationTask totalProcessingErrorCount */ + totalProcessingErrorCount?: (number|null); + + /** MigrationTask totalResourceErrorCount */ + totalResourceErrorCount?: (number|null); } /** Represents a MigrationTask. */ @@ -205,6 +226,9 @@ export namespace google { /** MigrationTask translationConfigDetails. */ public translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); + /** MigrationTask translationDetails. */ + public translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); + /** MigrationTask id. */ public id: string; @@ -223,8 +247,26 @@ export namespace google { /** MigrationTask lastUpdateTime. */ public lastUpdateTime?: (google.protobuf.ITimestamp|null); + /** MigrationTask resourceErrorDetails. */ + public resourceErrorDetails: google.cloud.bigquery.migration.v2.IResourceErrorDetail[]; + + /** MigrationTask resourceErrorCount. */ + public resourceErrorCount: number; + + /** MigrationTask metrics. */ + public metrics: google.cloud.bigquery.migration.v2.ITimeSeries[]; + + /** MigrationTask taskResult. */ + public taskResult?: (google.cloud.bigquery.migration.v2.IMigrationTaskResult|null); + + /** MigrationTask totalProcessingErrorCount. */ + public totalProcessingErrorCount: number; + + /** MigrationTask totalResourceErrorCount. */ + public totalResourceErrorCount: number; + /** MigrationTask taskDetails. */ - public taskDetails?: "translationConfigDetails"; + public taskDetails?: ("translationConfigDetails"|"translationDetails"); /** * Creates a new MigrationTask instance using the specified properties. @@ -483,6 +525,209 @@ export namespace google { } } + /** Properties of a MigrationTaskResult. */ + interface IMigrationTaskResult { + + /** MigrationTaskResult translationTaskResult */ + translationTaskResult?: (google.cloud.bigquery.migration.v2.ITranslationTaskResult|null); + } + + /** Represents a MigrationTaskResult. */ + class MigrationTaskResult implements IMigrationTaskResult { + + /** + * Constructs a new MigrationTaskResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationTaskResult); + + /** MigrationTaskResult translationTaskResult. */ + public translationTaskResult?: (google.cloud.bigquery.migration.v2.ITranslationTaskResult|null); + + /** MigrationTaskResult details. */ + public details?: "translationTaskResult"; + + /** + * Creates a new MigrationTaskResult instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationTaskResult instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationTaskResult): google.cloud.bigquery.migration.v2.MigrationTaskResult; + + /** + * Encodes the specified MigrationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * @param message MigrationTaskResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IMigrationTaskResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * @param message MigrationTaskResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationTaskResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationTaskResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationTaskResult + * @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.MigrationTaskResult; + + /** + * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationTaskResult + * @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.MigrationTaskResult; + + /** + * Verifies a MigrationTaskResult 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 MigrationTaskResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationTaskResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationTaskResult; + + /** + * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. + * @param message MigrationTaskResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.MigrationTaskResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationTaskResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationTaskResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TranslationTaskResult. */ + interface ITranslationTaskResult { + + /** TranslationTaskResult translatedLiterals */ + translatedLiterals?: (google.cloud.bigquery.migration.v2.ILiteral[]|null); + + /** TranslationTaskResult reportLogMessages */ + reportLogMessages?: (google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]|null); + } + + /** Represents a TranslationTaskResult. */ + class TranslationTaskResult implements ITranslationTaskResult { + + /** + * Constructs a new TranslationTaskResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITranslationTaskResult); + + /** TranslationTaskResult translatedLiterals. */ + public translatedLiterals: google.cloud.bigquery.migration.v2.ILiteral[]; + + /** TranslationTaskResult reportLogMessages. */ + public reportLogMessages: google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]; + + /** + * Creates a new TranslationTaskResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationTaskResult instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITranslationTaskResult): google.cloud.bigquery.migration.v2.TranslationTaskResult; + + /** + * Encodes the specified TranslationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * @param message TranslationTaskResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITranslationTaskResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * @param message TranslationTaskResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITranslationTaskResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationTaskResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationTaskResult + * @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.TranslationTaskResult; + + /** + * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationTaskResult + * @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.TranslationTaskResult; + + /** + * Verifies a TranslationTaskResult 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 TranslationTaskResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationTaskResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TranslationTaskResult; + + /** + * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. + * @param message TranslationTaskResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TranslationTaskResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationTaskResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationTaskResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ResourceErrorDetail. */ interface IResourceErrorDetail { @@ -1266,6 +1511,9 @@ export namespace google { /** TranslationConfigDetails requestSource */ requestSource?: (string|null); + + /** TranslationConfigDetails targetTypes */ + targetTypes?: (string[]|null); } /** Represents a TranslationConfigDetails. */ @@ -1298,6 +1546,9 @@ export namespace google { /** TranslationConfigDetails requestSource. */ public requestSource: string; + /** TranslationConfigDetails targetTypes. */ + public targetTypes: string[]; + /** TranslationConfigDetails sourceLocation. */ public sourceLocation?: "gcsSourcePath"; @@ -1429,6 +1680,15 @@ export namespace google { /** Dialect mysqlDialect */ mysqlDialect?: (google.cloud.bigquery.migration.v2.IMySQLDialect|null); + + /** Dialect db2Dialect */ + db2Dialect?: (google.cloud.bigquery.migration.v2.IDB2Dialect|null); + + /** Dialect sqliteDialect */ + sqliteDialect?: (google.cloud.bigquery.migration.v2.ISQLiteDialect|null); + + /** Dialect greenplumDialect */ + greenplumDialect?: (google.cloud.bigquery.migration.v2.IGreenplumDialect|null); } /** Represents a Dialect. */ @@ -1482,8 +1742,17 @@ export namespace google { /** Dialect mysqlDialect. */ public mysqlDialect?: (google.cloud.bigquery.migration.v2.IMySQLDialect|null); + /** Dialect db2Dialect. */ + public db2Dialect?: (google.cloud.bigquery.migration.v2.IDB2Dialect|null); + + /** Dialect sqliteDialect. */ + public sqliteDialect?: (google.cloud.bigquery.migration.v2.ISQLiteDialect|null); + + /** Dialect greenplumDialect. */ + public greenplumDialect?: (google.cloud.bigquery.migration.v2.IGreenplumDialect|null); + /** Dialect dialectValue. */ - public dialectValue?: ("bigqueryDialect"|"hiveqlDialect"|"redshiftDialect"|"teradataDialect"|"oracleDialect"|"sparksqlDialect"|"snowflakeDialect"|"netezzaDialect"|"azureSynapseDialect"|"verticaDialect"|"sqlServerDialect"|"postgresqlDialect"|"prestoDialect"|"mysqlDialect"); + public dialectValue?: ("bigqueryDialect"|"hiveqlDialect"|"redshiftDialect"|"teradataDialect"|"oracleDialect"|"sparksqlDialect"|"snowflakeDialect"|"netezzaDialect"|"azureSynapseDialect"|"verticaDialect"|"sqlServerDialect"|"postgresqlDialect"|"prestoDialect"|"mysqlDialect"|"db2Dialect"|"sqliteDialect"|"greenplumDialect"); /** * Creates a new Dialect instance using the specified properties. @@ -2853,554 +3122,1644 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ObjectNameMappingList. */ - interface IObjectNameMappingList { - - /** ObjectNameMappingList nameMap */ - nameMap?: (google.cloud.bigquery.migration.v2.IObjectNameMapping[]|null); + /** Properties of a DB2Dialect. */ + interface IDB2Dialect { } - /** Represents an ObjectNameMappingList. */ - class ObjectNameMappingList implements IObjectNameMappingList { + /** Represents a DB2Dialect. */ + class DB2Dialect implements IDB2Dialect { /** - * Constructs a new ObjectNameMappingList. + * Constructs a new DB2Dialect. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.bigquery.migration.v2.IObjectNameMappingList); - - /** ObjectNameMappingList nameMap. */ - public nameMap: google.cloud.bigquery.migration.v2.IObjectNameMapping[]; + constructor(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect); /** - * Creates a new ObjectNameMappingList instance using the specified properties. + * Creates a new DB2Dialect instance using the specified properties. * @param [properties] Properties to set - * @returns ObjectNameMappingList instance + * @returns DB2Dialect instance */ - public static create(properties?: google.cloud.bigquery.migration.v2.IObjectNameMappingList): google.cloud.bigquery.migration.v2.ObjectNameMappingList; + public static create(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect): google.cloud.bigquery.migration.v2.DB2Dialect; /** - * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. - * @param message ObjectNameMappingList message or plain object to encode + * Encodes the specified DB2Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * @param message DB2Dialect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.bigquery.migration.v2.IObjectNameMappingList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.bigquery.migration.v2.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. - * @param message ObjectNameMappingList message or plain object to encode + * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * @param message DB2Dialect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IObjectNameMappingList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * Decodes a DB2Dialect message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ObjectNameMappingList + * @returns DB2Dialect * @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.ObjectNameMappingList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.DB2Dialect; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ObjectNameMappingList + * @returns DB2Dialect * @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.ObjectNameMappingList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.DB2Dialect; /** - * Verifies an ObjectNameMappingList message. + * Verifies a DB2Dialect 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 ObjectNameMappingList 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. * @param object Plain object - * @returns ObjectNameMappingList + * @returns DB2Dialect */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ObjectNameMappingList; + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.DB2Dialect; /** - * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. - * @param message ObjectNameMappingList + * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. + * @param message DB2Dialect * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.bigquery.migration.v2.ObjectNameMappingList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.bigquery.migration.v2.DB2Dialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ObjectNameMappingList to JSON. + * Converts this DB2Dialect to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ObjectNameMappingList + * Gets the default type url for DB2Dialect * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ObjectNameMapping. */ - interface IObjectNameMapping { - - /** ObjectNameMapping source */ - source?: (google.cloud.bigquery.migration.v2.INameMappingKey|null); - - /** ObjectNameMapping target */ - target?: (google.cloud.bigquery.migration.v2.INameMappingValue|null); + /** Properties of a SQLiteDialect. */ + interface ISQLiteDialect { } - /** Represents an ObjectNameMapping. */ - class ObjectNameMapping implements IObjectNameMapping { + /** Represents a SQLiteDialect. */ + class SQLiteDialect implements ISQLiteDialect { /** - * Constructs a new ObjectNameMapping. + * Constructs a new SQLiteDialect. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.bigquery.migration.v2.IObjectNameMapping); - - /** ObjectNameMapping source. */ - public source?: (google.cloud.bigquery.migration.v2.INameMappingKey|null); - - /** ObjectNameMapping target. */ - public target?: (google.cloud.bigquery.migration.v2.INameMappingValue|null); + constructor(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect); /** - * Creates a new ObjectNameMapping instance using the specified properties. + * Creates a new SQLiteDialect instance using the specified properties. * @param [properties] Properties to set - * @returns ObjectNameMapping instance + * @returns SQLiteDialect instance */ - public static create(properties?: google.cloud.bigquery.migration.v2.IObjectNameMapping): google.cloud.bigquery.migration.v2.ObjectNameMapping; + public static create(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect): google.cloud.bigquery.migration.v2.SQLiteDialect; /** - * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. - * @param message ObjectNameMapping message or plain object to encode + * Encodes the specified SQLiteDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * @param message SQLiteDialect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.bigquery.migration.v2.IObjectNameMapping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.bigquery.migration.v2.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. - * @param message ObjectNameMapping message or plain object to encode + * Encodes the specified SQLiteDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * @param message SQLiteDialect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IObjectNameMapping, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer. + * Decodes a SQLiteDialect message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ObjectNameMapping + * @returns SQLiteDialect * @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.ObjectNameMapping; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SQLiteDialect; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ObjectNameMapping + * @returns SQLiteDialect * @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.ObjectNameMapping; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SQLiteDialect; /** - * Verifies an ObjectNameMapping message. + * Verifies a SQLiteDialect 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 ObjectNameMapping 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. * @param object Plain object - * @returns ObjectNameMapping + * @returns SQLiteDialect */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ObjectNameMapping; + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SQLiteDialect; /** - * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. - * @param message ObjectNameMapping + * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. + * @param message SQLiteDialect * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.bigquery.migration.v2.ObjectNameMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.bigquery.migration.v2.SQLiteDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ObjectNameMapping to JSON. + * Converts this SQLiteDialect to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ObjectNameMapping + * Gets the default type url for SQLiteDialect * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NameMappingKey. */ - interface INameMappingKey { - - /** NameMappingKey type */ - type?: (google.cloud.bigquery.migration.v2.NameMappingKey.Type|keyof typeof google.cloud.bigquery.migration.v2.NameMappingKey.Type|null); - - /** NameMappingKey database */ - database?: (string|null); - - /** NameMappingKey schema */ - schema?: (string|null); - - /** NameMappingKey relation */ - relation?: (string|null); - - /** NameMappingKey attribute */ - attribute?: (string|null); + /** Properties of a GreenplumDialect. */ + interface IGreenplumDialect { } - /** Represents a NameMappingKey. */ - class NameMappingKey implements INameMappingKey { + /** Represents a GreenplumDialect. */ + class GreenplumDialect implements IGreenplumDialect { /** - * Constructs a new NameMappingKey. + * Constructs a new GreenplumDialect. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.bigquery.migration.v2.INameMappingKey); + constructor(properties?: google.cloud.bigquery.migration.v2.IGreenplumDialect); + + /** + * Creates a new GreenplumDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns GreenplumDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IGreenplumDialect): google.cloud.bigquery.migration.v2.GreenplumDialect; + + /** + * Encodes the specified GreenplumDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * @param message GreenplumDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IGreenplumDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GreenplumDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * @param message GreenplumDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGreenplumDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GreenplumDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GreenplumDialect + * @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.GreenplumDialect; + + /** + * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GreenplumDialect + * @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.GreenplumDialect; + + /** + * Verifies a GreenplumDialect 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 GreenplumDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GreenplumDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GreenplumDialect; + + /** + * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. + * @param message GreenplumDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.GreenplumDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GreenplumDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GreenplumDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ObjectNameMappingList. */ + interface IObjectNameMappingList { + + /** ObjectNameMappingList nameMap */ + nameMap?: (google.cloud.bigquery.migration.v2.IObjectNameMapping[]|null); + } + + /** Represents an ObjectNameMappingList. */ + class ObjectNameMappingList implements IObjectNameMappingList { + + /** + * Constructs a new ObjectNameMappingList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IObjectNameMappingList); + + /** ObjectNameMappingList nameMap. */ + public nameMap: google.cloud.bigquery.migration.v2.IObjectNameMapping[]; + + /** + * Creates a new ObjectNameMappingList instance using the specified properties. + * @param [properties] Properties to set + * @returns ObjectNameMappingList instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IObjectNameMappingList): google.cloud.bigquery.migration.v2.ObjectNameMappingList; + + /** + * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * @param message ObjectNameMappingList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IObjectNameMappingList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * @param message ObjectNameMappingList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IObjectNameMappingList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObjectNameMappingList + * @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.ObjectNameMappingList; + + /** + * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObjectNameMappingList + * @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.ObjectNameMappingList; + + /** + * Verifies an ObjectNameMappingList 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 ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObjectNameMappingList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ObjectNameMappingList; + + /** + * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. + * @param message ObjectNameMappingList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ObjectNameMappingList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObjectNameMappingList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObjectNameMappingList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ObjectNameMapping. */ + interface IObjectNameMapping { + + /** ObjectNameMapping source */ + source?: (google.cloud.bigquery.migration.v2.INameMappingKey|null); + + /** ObjectNameMapping target */ + target?: (google.cloud.bigquery.migration.v2.INameMappingValue|null); + } + + /** Represents an ObjectNameMapping. */ + class ObjectNameMapping implements IObjectNameMapping { + + /** + * Constructs a new ObjectNameMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IObjectNameMapping); + + /** ObjectNameMapping source. */ + public source?: (google.cloud.bigquery.migration.v2.INameMappingKey|null); + + /** ObjectNameMapping target. */ + public target?: (google.cloud.bigquery.migration.v2.INameMappingValue|null); + + /** + * Creates a new ObjectNameMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns ObjectNameMapping instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IObjectNameMapping): google.cloud.bigquery.migration.v2.ObjectNameMapping; + + /** + * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * @param message ObjectNameMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IObjectNameMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * @param message ObjectNameMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IObjectNameMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObjectNameMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObjectNameMapping + * @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.ObjectNameMapping; + + /** + * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObjectNameMapping + * @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.ObjectNameMapping; + + /** + * Verifies an ObjectNameMapping 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 ObjectNameMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObjectNameMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ObjectNameMapping; + + /** + * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. + * @param message ObjectNameMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ObjectNameMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObjectNameMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObjectNameMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NameMappingKey. */ + interface INameMappingKey { + + /** NameMappingKey type */ + type?: (google.cloud.bigquery.migration.v2.NameMappingKey.Type|keyof typeof google.cloud.bigquery.migration.v2.NameMappingKey.Type|null); + + /** NameMappingKey database */ + database?: (string|null); + + /** NameMappingKey schema */ + schema?: (string|null); + + /** NameMappingKey relation */ + relation?: (string|null); + + /** NameMappingKey attribute */ + attribute?: (string|null); + } + + /** Represents a NameMappingKey. */ + class NameMappingKey implements INameMappingKey { + + /** + * Constructs a new NameMappingKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.INameMappingKey); /** NameMappingKey type. */ public type: (google.cloud.bigquery.migration.v2.NameMappingKey.Type|keyof typeof google.cloud.bigquery.migration.v2.NameMappingKey.Type); - /** NameMappingKey database. */ - public database: string; + /** NameMappingKey database. */ + public database: string; + + /** NameMappingKey schema. */ + public schema: string; + + /** NameMappingKey relation. */ + public relation: string; + + /** NameMappingKey attribute. */ + public attribute: string; + + /** + * Creates a new NameMappingKey instance using the specified properties. + * @param [properties] Properties to set + * @returns NameMappingKey instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.INameMappingKey): google.cloud.bigquery.migration.v2.NameMappingKey; + + /** + * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * @param message NameMappingKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.INameMappingKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * @param message NameMappingKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INameMappingKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NameMappingKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NameMappingKey + * @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.NameMappingKey; + + /** + * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NameMappingKey + * @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.NameMappingKey; + + /** + * Verifies a NameMappingKey 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 NameMappingKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NameMappingKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NameMappingKey; + + /** + * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. + * @param message NameMappingKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.NameMappingKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NameMappingKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NameMappingKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NameMappingKey { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + DATABASE = 1, + SCHEMA = 2, + RELATION = 3, + ATTRIBUTE = 4, + RELATION_ALIAS = 5, + ATTRIBUTE_ALIAS = 6, + FUNCTION = 7 + } + } + + /** Properties of a NameMappingValue. */ + interface INameMappingValue { + + /** NameMappingValue database */ + database?: (string|null); + + /** NameMappingValue schema */ + schema?: (string|null); + + /** NameMappingValue relation */ + relation?: (string|null); + + /** NameMappingValue attribute */ + attribute?: (string|null); + } + + /** Represents a NameMappingValue. */ + class NameMappingValue implements INameMappingValue { + + /** + * Constructs a new NameMappingValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.INameMappingValue); + + /** NameMappingValue database. */ + public database: string; + + /** NameMappingValue schema. */ + public schema: string; + + /** NameMappingValue relation. */ + public relation: string; + + /** NameMappingValue attribute. */ + public attribute: string; + + /** + * Creates a new NameMappingValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NameMappingValue instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.INameMappingValue): google.cloud.bigquery.migration.v2.NameMappingValue; + + /** + * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * @param message NameMappingValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.INameMappingValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * @param message NameMappingValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INameMappingValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NameMappingValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NameMappingValue + * @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.NameMappingValue; + + /** + * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NameMappingValue + * @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.NameMappingValue; + + /** + * Verifies a NameMappingValue 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 NameMappingValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NameMappingValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NameMappingValue; + + /** + * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. + * @param message NameMappingValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.NameMappingValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NameMappingValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NameMappingValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceEnv. */ + interface ISourceEnv { + + /** SourceEnv defaultDatabase */ + defaultDatabase?: (string|null); + + /** SourceEnv schemaSearchPath */ + schemaSearchPath?: (string[]|null); + + /** SourceEnv metadataStoreDataset */ + metadataStoreDataset?: (string|null); + } + + /** Represents a SourceEnv. */ + class SourceEnv implements ISourceEnv { + + /** + * Constructs a new SourceEnv. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISourceEnv); + + /** SourceEnv defaultDatabase. */ + public defaultDatabase: string; + + /** SourceEnv schemaSearchPath. */ + public schemaSearchPath: string[]; + + /** SourceEnv metadataStoreDataset. */ + public metadataStoreDataset: string; + + /** + * Creates a new SourceEnv instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceEnv instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISourceEnv): google.cloud.bigquery.migration.v2.SourceEnv; + + /** + * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * @param message SourceEnv message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISourceEnv, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * @param message SourceEnv message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISourceEnv, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceEnv message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceEnv + * @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.SourceEnv; + + /** + * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceEnv + * @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.SourceEnv; + + /** + * Verifies a SourceEnv 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 SourceEnv message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceEnv + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceEnv; + + /** + * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. + * @param message SourceEnv + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SourceEnv, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceEnv to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceEnv + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TranslationDetails. */ + interface ITranslationDetails { + + /** TranslationDetails sourceTargetMapping */ + sourceTargetMapping?: (google.cloud.bigquery.migration.v2.ISourceTargetMapping[]|null); + + /** TranslationDetails targetBaseUri */ + targetBaseUri?: (string|null); + + /** TranslationDetails sourceEnvironment */ + sourceEnvironment?: (google.cloud.bigquery.migration.v2.ISourceEnvironment|null); + + /** TranslationDetails targetReturnLiterals */ + targetReturnLiterals?: (string[]|null); + + /** TranslationDetails targetTypes */ + targetTypes?: (string[]|null); + } + + /** Represents a TranslationDetails. */ + class TranslationDetails implements ITranslationDetails { + + /** + * Constructs a new TranslationDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITranslationDetails); + + /** TranslationDetails sourceTargetMapping. */ + public sourceTargetMapping: google.cloud.bigquery.migration.v2.ISourceTargetMapping[]; + + /** TranslationDetails targetBaseUri. */ + public targetBaseUri: string; + + /** TranslationDetails sourceEnvironment. */ + public sourceEnvironment?: (google.cloud.bigquery.migration.v2.ISourceEnvironment|null); + + /** TranslationDetails targetReturnLiterals. */ + public targetReturnLiterals: string[]; + + /** TranslationDetails targetTypes. */ + public targetTypes: string[]; + + /** + * Creates a new TranslationDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITranslationDetails): google.cloud.bigquery.migration.v2.TranslationDetails; + + /** + * Encodes the specified TranslationDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * @param message TranslationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITranslationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * @param message TranslationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITranslationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationDetails + * @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.TranslationDetails; + + /** + * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationDetails + * @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.TranslationDetails; + + /** + * Verifies a TranslationDetails 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 TranslationDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TranslationDetails; + + /** + * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. + * @param message TranslationDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TranslationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceTargetMapping. */ + interface ISourceTargetMapping { + + /** SourceTargetMapping sourceSpec */ + sourceSpec?: (google.cloud.bigquery.migration.v2.ISourceSpec|null); + + /** SourceTargetMapping targetSpec */ + targetSpec?: (google.cloud.bigquery.migration.v2.ITargetSpec|null); + } + + /** Represents a SourceTargetMapping. */ + class SourceTargetMapping implements ISourceTargetMapping { + + /** + * Constructs a new SourceTargetMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISourceTargetMapping); + + /** SourceTargetMapping sourceSpec. */ + public sourceSpec?: (google.cloud.bigquery.migration.v2.ISourceSpec|null); + + /** SourceTargetMapping targetSpec. */ + public targetSpec?: (google.cloud.bigquery.migration.v2.ITargetSpec|null); + + /** + * Creates a new SourceTargetMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceTargetMapping instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISourceTargetMapping): google.cloud.bigquery.migration.v2.SourceTargetMapping; + + /** + * Encodes the specified SourceTargetMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceTargetMapping.verify|verify} messages. + * @param message SourceTargetMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISourceTargetMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceTargetMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceTargetMapping.verify|verify} messages. + * @param message SourceTargetMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISourceTargetMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceTargetMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceTargetMapping + * @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.SourceTargetMapping; + + /** + * Decodes a SourceTargetMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceTargetMapping + * @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.SourceTargetMapping; + + /** + * Verifies a SourceTargetMapping 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 SourceTargetMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceTargetMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceTargetMapping; + + /** + * Creates a plain object from a SourceTargetMapping message. Also converts values to other types if specified. + * @param message SourceTargetMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SourceTargetMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceTargetMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceTargetMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceSpec. */ + interface ISourceSpec { + + /** SourceSpec baseUri */ + baseUri?: (string|null); + + /** SourceSpec literal */ + literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + + /** SourceSpec encoding */ + encoding?: (string|null); + } + + /** Represents a SourceSpec. */ + class SourceSpec implements ISourceSpec { + + /** + * Constructs a new SourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISourceSpec); + + /** SourceSpec baseUri. */ + public baseUri?: (string|null); + + /** SourceSpec literal. */ + public literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + + /** SourceSpec encoding. */ + public encoding: string; + + /** SourceSpec source. */ + public source?: ("baseUri"|"literal"); + + /** + * Creates a new SourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceSpec instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISourceSpec): google.cloud.bigquery.migration.v2.SourceSpec; + + /** + * Encodes the specified SourceSpec message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceSpec.verify|verify} messages. + * @param message SourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceSpec message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceSpec.verify|verify} messages. + * @param message SourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceSpec + * @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.SourceSpec; + + /** + * Decodes a SourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceSpec + * @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.SourceSpec; + + /** + * Verifies a SourceSpec 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 SourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceSpec; + + /** + * Creates a plain object from a SourceSpec message. Also converts values to other types if specified. + * @param message SourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetSpec. */ + interface ITargetSpec { + + /** TargetSpec relativePath */ + relativePath?: (string|null); + } + + /** Represents a TargetSpec. */ + class TargetSpec implements ITargetSpec { + + /** + * Constructs a new TargetSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITargetSpec); + + /** TargetSpec relativePath. */ + public relativePath: string; + + /** + * Creates a new TargetSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetSpec instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITargetSpec): google.cloud.bigquery.migration.v2.TargetSpec; + + /** + * Encodes the specified TargetSpec message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TargetSpec.verify|verify} messages. + * @param message TargetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetSpec message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TargetSpec.verify|verify} messages. + * @param message TargetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITargetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetSpec + * @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.TargetSpec; + + /** + * Decodes a TargetSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetSpec + * @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.TargetSpec; + + /** + * Verifies a TargetSpec 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 TargetSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TargetSpec; + + /** + * Creates a plain object from a TargetSpec message. Also converts values to other types if specified. + * @param message TargetSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TargetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NameMappingKey schema. */ - public schema: string; + /** + * Gets the default type url for TargetSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** NameMappingKey relation. */ - public relation: string; + /** Properties of a Literal. */ + interface ILiteral { - /** NameMappingKey attribute. */ - public attribute: string; + /** Literal literalString */ + literalString?: (string|null); + + /** Literal literalBytes */ + literalBytes?: (Uint8Array|string|null); + + /** Literal relativePath */ + relativePath?: (string|null); + } + + /** Represents a Literal. */ + class Literal implements ILiteral { /** - * Creates a new NameMappingKey instance using the specified properties. + * Constructs a new Literal. * @param [properties] Properties to set - * @returns NameMappingKey instance */ - public static create(properties?: google.cloud.bigquery.migration.v2.INameMappingKey): google.cloud.bigquery.migration.v2.NameMappingKey; + constructor(properties?: google.cloud.bigquery.migration.v2.ILiteral); + + /** Literal literalString. */ + public literalString?: (string|null); + + /** Literal literalBytes. */ + public literalBytes?: (Uint8Array|string|null); + + /** Literal relativePath. */ + public relativePath: string; + + /** Literal literalData. */ + public literalData?: ("literalString"|"literalBytes"); /** - * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. - * @param message NameMappingKey message or plain object to encode + * Creates a new Literal instance using the specified properties. + * @param [properties] Properties to set + * @returns Literal instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ILiteral): google.cloud.bigquery.migration.v2.Literal; + + /** + * Encodes the specified Literal message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Literal.verify|verify} messages. + * @param message Literal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.bigquery.migration.v2.INameMappingKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.bigquery.migration.v2.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. - * @param message NameMappingKey message or plain object to encode + * Encodes the specified Literal message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Literal.verify|verify} messages. + * @param message Literal message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INameMappingKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NameMappingKey message from the specified reader or buffer. + * Decodes a Literal message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NameMappingKey + * @returns Literal * @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.NameMappingKey; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.Literal; /** - * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * Decodes a Literal message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NameMappingKey + * @returns Literal * @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.NameMappingKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.Literal; /** - * Verifies a NameMappingKey message. + * Verifies a Literal 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 NameMappingKey message from a plain object. Also converts values to their respective internal types. + * Creates a Literal message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NameMappingKey + * @returns Literal */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NameMappingKey; + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Literal; /** - * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. - * @param message NameMappingKey + * Creates a plain object from a Literal message. Also converts values to other types if specified. + * @param message Literal * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.bigquery.migration.v2.NameMappingKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.bigquery.migration.v2.Literal, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NameMappingKey to JSON. + * Converts this Literal to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NameMappingKey + * Gets the default type url for Literal * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NameMappingKey { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - DATABASE = 1, - SCHEMA = 2, - RELATION = 3, - ATTRIBUTE = 4, - RELATION_ALIAS = 5, - ATTRIBUTE_ALIAS = 6, - FUNCTION = 7 - } - } - - /** Properties of a NameMappingValue. */ - interface INameMappingValue { - - /** NameMappingValue database */ - database?: (string|null); + /** Properties of a SourceEnvironment. */ + interface ISourceEnvironment { - /** NameMappingValue schema */ - schema?: (string|null); + /** SourceEnvironment defaultDatabase */ + defaultDatabase?: (string|null); - /** NameMappingValue relation */ - relation?: (string|null); + /** SourceEnvironment schemaSearchPath */ + schemaSearchPath?: (string[]|null); - /** NameMappingValue attribute */ - attribute?: (string|null); + /** SourceEnvironment metadataStoreDataset */ + metadataStoreDataset?: (string|null); } - /** Represents a NameMappingValue. */ - class NameMappingValue implements INameMappingValue { + /** Represents a SourceEnvironment. */ + class SourceEnvironment implements ISourceEnvironment { /** - * Constructs a new NameMappingValue. + * Constructs a new SourceEnvironment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.bigquery.migration.v2.INameMappingValue); - - /** NameMappingValue database. */ - public database: string; + constructor(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment); - /** NameMappingValue schema. */ - public schema: string; + /** SourceEnvironment defaultDatabase. */ + public defaultDatabase: string; - /** NameMappingValue relation. */ - public relation: string; + /** SourceEnvironment schemaSearchPath. */ + public schemaSearchPath: string[]; - /** NameMappingValue attribute. */ - public attribute: string; + /** SourceEnvironment metadataStoreDataset. */ + public metadataStoreDataset: string; /** - * Creates a new NameMappingValue instance using the specified properties. + * Creates a new SourceEnvironment instance using the specified properties. * @param [properties] Properties to set - * @returns NameMappingValue instance + * @returns SourceEnvironment instance */ - public static create(properties?: google.cloud.bigquery.migration.v2.INameMappingValue): google.cloud.bigquery.migration.v2.NameMappingValue; + public static create(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment): google.cloud.bigquery.migration.v2.SourceEnvironment; /** - * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. - * @param message NameMappingValue message or plain object to encode + * Encodes the specified SourceEnvironment message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnvironment.verify|verify} messages. + * @param message SourceEnvironment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.bigquery.migration.v2.INameMappingValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.bigquery.migration.v2.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. - * @param message NameMappingValue message or plain object to encode + * Encodes the specified SourceEnvironment message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnvironment.verify|verify} messages. + * @param message SourceEnvironment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INameMappingValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NameMappingValue message from the specified reader or buffer. + * Decodes a SourceEnvironment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NameMappingValue + * @returns SourceEnvironment * @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.NameMappingValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SourceEnvironment; /** - * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NameMappingValue + * @returns SourceEnvironment * @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.NameMappingValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SourceEnvironment; /** - * Verifies a NameMappingValue message. + * Verifies a SourceEnvironment 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 NameMappingValue message from a plain object. Also converts values to their respective internal types. + * Creates a SourceEnvironment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NameMappingValue + * @returns SourceEnvironment */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NameMappingValue; + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceEnvironment; /** - * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. - * @param message NameMappingValue + * Creates a plain object from a SourceEnvironment message. Also converts values to other types if specified. + * @param message SourceEnvironment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.bigquery.migration.v2.NameMappingValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.bigquery.migration.v2.SourceEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NameMappingValue to JSON. + * Converts this SourceEnvironment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NameMappingValue + * Gets the default type url for SourceEnvironment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SourceEnv. */ - interface ISourceEnv { + /** Properties of a GcsReportLogMessage. */ + interface IGcsReportLogMessage { - /** SourceEnv defaultDatabase */ - defaultDatabase?: (string|null); + /** GcsReportLogMessage severity */ + severity?: (string|null); - /** SourceEnv schemaSearchPath */ - schemaSearchPath?: (string[]|null); + /** GcsReportLogMessage category */ + category?: (string|null); + + /** GcsReportLogMessage filePath */ + filePath?: (string|null); + + /** GcsReportLogMessage filename */ + filename?: (string|null); + + /** GcsReportLogMessage sourceScriptLine */ + sourceScriptLine?: (number|null); + + /** GcsReportLogMessage sourceScriptColumn */ + sourceScriptColumn?: (number|null); + + /** GcsReportLogMessage message */ + message?: (string|null); + + /** GcsReportLogMessage scriptContext */ + scriptContext?: (string|null); + + /** GcsReportLogMessage action */ + action?: (string|null); + + /** GcsReportLogMessage effect */ + effect?: (string|null); + + /** GcsReportLogMessage objectName */ + objectName?: (string|null); } - /** Represents a SourceEnv. */ - class SourceEnv implements ISourceEnv { + /** Represents a GcsReportLogMessage. */ + class GcsReportLogMessage implements IGcsReportLogMessage { /** - * Constructs a new SourceEnv. + * Constructs a new GcsReportLogMessage. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISourceEnv); + constructor(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage); - /** SourceEnv defaultDatabase. */ - public defaultDatabase: string; + /** GcsReportLogMessage severity. */ + public severity: string; - /** SourceEnv schemaSearchPath. */ - public schemaSearchPath: string[]; + /** GcsReportLogMessage category. */ + public category: string; + + /** GcsReportLogMessage filePath. */ + public filePath: string; + + /** GcsReportLogMessage filename. */ + public filename: string; + + /** GcsReportLogMessage sourceScriptLine. */ + public sourceScriptLine: number; + + /** GcsReportLogMessage sourceScriptColumn. */ + public sourceScriptColumn: number; + + /** GcsReportLogMessage message. */ + public message: string; + + /** GcsReportLogMessage scriptContext. */ + public scriptContext: string; + + /** GcsReportLogMessage action. */ + public action: string; + + /** GcsReportLogMessage effect. */ + public effect: string; + + /** GcsReportLogMessage objectName. */ + public objectName: string; /** - * Creates a new SourceEnv instance using the specified properties. + * Creates a new GcsReportLogMessage instance using the specified properties. * @param [properties] Properties to set - * @returns SourceEnv instance + * @returns GcsReportLogMessage instance */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISourceEnv): google.cloud.bigquery.migration.v2.SourceEnv; + public static create(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage): google.cloud.bigquery.migration.v2.GcsReportLogMessage; /** - * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. - * @param message SourceEnv message or plain object to encode + * Encodes the specified GcsReportLogMessage message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify|verify} messages. + * @param message GcsReportLogMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.bigquery.migration.v2.ISourceEnv, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.bigquery.migration.v2.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. - * @param message SourceEnv message or plain object to encode + * Encodes the specified GcsReportLogMessage message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify|verify} messages. + * @param message GcsReportLogMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISourceEnv, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceEnv message from the specified reader or buffer. + * Decodes a GcsReportLogMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceEnv + * @returns GcsReportLogMessage * @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.SourceEnv; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.GcsReportLogMessage; /** - * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceEnv + * @returns GcsReportLogMessage * @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.SourceEnv; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.GcsReportLogMessage; /** - * Verifies a SourceEnv message. + * Verifies a GcsReportLogMessage 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 SourceEnv message from a plain object. Also converts values to their respective internal types. + * Creates a GcsReportLogMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceEnv + * @returns GcsReportLogMessage */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceEnv; + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GcsReportLogMessage; /** - * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. - * @param message SourceEnv + * Creates a plain object from a GcsReportLogMessage message. Also converts values to other types if specified. + * @param message GcsReportLogMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.bigquery.migration.v2.SourceEnv, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.bigquery.migration.v2.GcsReportLogMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceEnv to JSON. + * Converts this GcsReportLogMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceEnv + * Gets the default type url for GcsReportLogMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4522,6 +5881,138 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a TranslationReportRecord. */ + interface ITranslationReportRecord { + + /** TranslationReportRecord severity */ + severity?: (google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity|keyof typeof google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity|null); + + /** TranslationReportRecord scriptLine */ + scriptLine?: (number|null); + + /** TranslationReportRecord scriptColumn */ + scriptColumn?: (number|null); + + /** TranslationReportRecord category */ + category?: (string|null); + + /** TranslationReportRecord message */ + message?: (string|null); + } + + /** Represents a TranslationReportRecord. */ + class TranslationReportRecord implements ITranslationReportRecord { + + /** + * Constructs a new TranslationReportRecord. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITranslationReportRecord); + + /** TranslationReportRecord severity. */ + public severity: (google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity|keyof typeof google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity); + + /** TranslationReportRecord scriptLine. */ + public scriptLine: number; + + /** TranslationReportRecord scriptColumn. */ + public scriptColumn: number; + + /** TranslationReportRecord category. */ + public category: string; + + /** TranslationReportRecord message. */ + public message: string; + + /** + * Creates a new TranslationReportRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationReportRecord instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITranslationReportRecord): google.cloud.bigquery.migration.v2.TranslationReportRecord; + + /** + * Encodes the specified TranslationReportRecord message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationReportRecord.verify|verify} messages. + * @param message TranslationReportRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITranslationReportRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationReportRecord message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationReportRecord.verify|verify} messages. + * @param message TranslationReportRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITranslationReportRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationReportRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationReportRecord + * @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.TranslationReportRecord; + + /** + * Decodes a TranslationReportRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationReportRecord + * @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.TranslationReportRecord; + + /** + * Verifies a TranslationReportRecord 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 TranslationReportRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationReportRecord + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TranslationReportRecord; + + /** + * Creates a plain object from a TranslationReportRecord message. Also converts values to other types if specified. + * @param message TranslationReportRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TranslationReportRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationReportRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationReportRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TranslationReportRecord { + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ERROR = 3 + } + } } /** Namespace v2alpha. */ diff --git a/packages/google-cloud-bigquery-migration/protos/protos.js b/packages/google-cloud-bigquery-migration/protos/protos.js index 00baa85a97b..f6ba3cb0f23 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.js +++ b/packages/google-cloud-bigquery-migration/protos/protos.js @@ -508,12 +508,19 @@ * @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 */ /** @@ -525,6 +532,8 @@ * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set */ function MigrationTask(properties) { + this.resourceErrorDetails = []; + this.metrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -539,6 +548,14 @@ */ MigrationTask.prototype.translationConfigDetails = null; + /** + * 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 @@ -587,17 +604,65 @@ */ MigrationTask.prototype.lastUpdateTime = null; + /** + * MigrationTask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.resourceErrorDetails = $util.emptyArray; + + /** + * MigrationTask resourceErrorCount. + * @member {number} resourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.resourceErrorCount = 0; + + /** + * MigrationTask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.metrics = $util.emptyArray; + + /** + * MigrationTask taskResult. + * @member {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null|undefined} taskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.taskResult = null; + + /** + * MigrationTask totalProcessingErrorCount. + * @member {number} totalProcessingErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.totalProcessingErrorCount = 0; + + /** + * 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 {"translationConfigDetails"|undefined} taskDetails + * @member {"translationConfigDetails"|"translationDetails"|undefined} taskDetails * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ Object.defineProperty(MigrationTask.prototype, "taskDetails", { - get: $util.oneOfGetter($oneOfFields = ["translationConfigDetails"]), + get: $util.oneOfGetter($oneOfFields = ["translationConfigDetails", "translationDetails"]), set: $util.oneOfSetter($oneOfFields) }); @@ -639,6 +704,22 @@ $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); return writer; }; @@ -677,6 +758,10 @@ 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.id = reader.string(); break; @@ -701,6 +786,34 @@ 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; @@ -745,6 +858,16 @@ 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"; @@ -779,6 +902,38 @@ 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; }; @@ -799,6 +954,11 @@ 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) @@ -854,6 +1014,37 @@ 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.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; }; @@ -870,6 +1061,10 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.resourceErrorDetails = []; + object.metrics = []; + } if (options.defaults) { object.id = ""; object.type = ""; @@ -877,6 +1072,10 @@ object.processingError = null; object.createTime = null; object.lastUpdateTime = null; + object.resourceErrorCount = 0; + object.taskResult = null; + object.totalProcessingErrorCount = 0; + object.totalResourceErrorCount = 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -895,6 +1094,29 @@ 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; return object; }; @@ -1489,27 +1711,24 @@ return MigrationSubtask; })(); - v2.ResourceErrorDetail = (function() { + v2.MigrationTaskResult = (function() { /** - * Properties of a ResourceErrorDetail. + * Properties of a MigrationTaskResult. * @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 IMigrationTaskResult + * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult */ /** - * Constructs a new ResourceErrorDetail. + * Constructs a new MigrationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ResourceErrorDetail. - * @implements IResourceErrorDetail + * @classdesc Represents a MigrationTaskResult. + * @implements IMigrationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set */ - function ResourceErrorDetail(properties) { - this.errorDetails = []; + function MigrationTaskResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1517,106 +1736,89 @@ } /** - * ResourceErrorDetail resourceInfo. - * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * MigrationTaskResult translationTaskResult. + * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - ResourceErrorDetail.prototype.resourceInfo = null; + MigrationTaskResult.prototype.translationTaskResult = null; - /** - * ResourceErrorDetail errorDetails. - * @member {Array.} errorDetails - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceErrorDetail errorCount. - * @member {number} errorCount - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * MigrationTaskResult details. + * @member {"translationTaskResult"|undefined} details + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - ResourceErrorDetail.prototype.errorCount = 0; + Object.defineProperty(MigrationTaskResult.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ResourceErrorDetail instance using the specified properties. + * Creates a new MigrationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @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.IMigrationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance */ - ResourceErrorDetail.create = function create(properties) { - return new ResourceErrorDetail(properties); + MigrationTaskResult.create = function create(properties) { + return new MigrationTaskResult(properties); }; /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.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.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail 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 */ - ResourceErrorDetail.encode = function encode(message, writer) { + MigrationTaskResult.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.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 ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.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.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail 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 */ - ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceErrorDetail 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.ResourceErrorDetail + * @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.ResourceErrorDetail} ResourceErrorDetail + * @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 */ - ResourceErrorDetail.decode = function decode(reader, length) { + MigrationTaskResult.decode = function decode(reader, length) { 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.MigrationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.resourceInfo = $root.google.rpc.ResourceInfo.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())); - break; - } - case 3: { - message.errorCount = reader.int32(); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); break; } default: @@ -1628,163 +1830,135 @@ }; /** - * Decodes a ResourceErrorDetail 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.ResourceErrorDetail + * @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.ResourceErrorDetail} ResourceErrorDetail + * @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 */ - ResourceErrorDetail.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 ResourceErrorDetail message. + * Verifies a MigrationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @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 */ - ResourceErrorDetail.verify = function verify(message) { + MigrationTaskResult.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.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]); + 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 "errorDetails." + error; + return "translationTaskResult." + error; } } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - if (!$util.isInteger(message.errorCount)) - return "errorCount: integer expected"; return null; }; /** - * Creates a ResourceErrorDetail 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.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult */ - ResourceErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail) + 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.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.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]); - } + 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); } - if (object.errorCount != null) - message.errorCount = object.errorCount | 0; return message; }; /** - * Creates a plain object from a ResourceErrorDetail 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.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail + * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceErrorDetail.toObject = function toObject(message, options) { + MigrationTaskResult.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 (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 (message.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; return object; }; /** - * Converts this ResourceErrorDetail to JSON. + * Converts this MigrationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance * @returns {Object.} JSON object */ - ResourceErrorDetail.prototype.toJSON = function toJSON() { + MigrationTaskResult.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 MigrationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationTaskResult.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.MigrationTaskResult"; }; - return ResourceErrorDetail; + return MigrationTaskResult; })(); - v2.ErrorDetail = (function() { + v2.TranslationTaskResult = (function() { /** - * Properties of an ErrorDetail. + * Properties of a TranslationTaskResult. * @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 ITranslationTaskResult + * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals + * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages */ /** - * Constructs a new ErrorDetail. + * Constructs a new TranslationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorDetail. - * @implements IErrorDetail + * @classdesc Represents a TranslationTaskResult. + * @implements ITranslationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set */ - function ErrorDetail(properties) { + 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) @@ -1792,89 +1966,95 @@ } /** - * ErrorDetail location. - * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * TranslationTaskResult translatedLiterals. + * @member {Array.} translatedLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ErrorDetail.prototype.location = null; + TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; /** - * ErrorDetail errorInfo. - * @member {google.rpc.IErrorInfo|null|undefined} errorInfo - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * TranslationTaskResult reportLogMessages. + * @member {Array.} reportLogMessages + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ErrorDetail.prototype.errorInfo = null; + TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; /** - * Creates a new ErrorDetail instance using the specified properties. + * Creates a new TranslationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @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.ITranslationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance */ - ErrorDetail.create = function create(properties) { - return new ErrorDetail(properties); + TranslationTaskResult.create = function create(properties) { + return new TranslationTaskResult(properties); }; /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.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.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail 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 */ - ErrorDetail.encode = function encode(message, writer) { + TranslationTaskResult.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.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(); 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 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.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail 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 */ - ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorDetail 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.ErrorDetail + * @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.ErrorDetail} ErrorDetail + * @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 */ - ErrorDetail.decode = function decode(reader, length) { + TranslationTaskResult.decode = function decode(reader, length) { 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.TranslationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.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: { - message.errorInfo = $root.google.rpc.ErrorInfo.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; } default: @@ -1886,142 +2066,168 @@ }; /** - * Decodes an ErrorDetail 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.ErrorDetail + * @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.ErrorDetail} ErrorDetail + * @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 */ - ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ErrorDetail message. + * Verifies a TranslationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @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 */ - ErrorDetail.verify = function verify(message) { + TranslationTaskResult.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.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.errorInfo != null && message.hasOwnProperty("errorInfo")) { - var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); - if (error) - return "errorInfo." + 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]); + if (error) + return "reportLogMessages." + error; + } } return null; }; /** - * Creates an ErrorDetail 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.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult */ - ErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + 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.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.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.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.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]); + } } return message; }; /** - * Creates a plain object from an ErrorDetail 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.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorDetail.toObject = function toObject(message, options) { + TranslationTaskResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.location = null; - object.errorInfo = null; + 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.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. + * Converts this TranslationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance * @returns {Object.} JSON object */ - ErrorDetail.prototype.toJSON = function toJSON() { + TranslationTaskResult.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 TranslationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationTaskResult.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.TranslationTaskResult"; }; - return ErrorDetail; + return TranslationTaskResult; })(); - v2.ErrorLocation = (function() { + v2.ResourceErrorDetail = (function() { /** - * Properties of an ErrorLocation. + * Properties of a ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorLocation - * @property {number|null} [line] ErrorLocation line - * @property {number|null} [column] ErrorLocation column + * @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 ErrorLocation. + * Constructs a new ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorLocation. - * @implements IErrorLocation + * @classdesc Represents a ResourceErrorDetail. + * @implements IResourceErrorDetail * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set */ - function ErrorLocation(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) @@ -2029,89 +2235,106 @@ } /** - * ErrorLocation line. - * @member {number} line - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * ResourceErrorDetail resourceInfo. + * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorLocation.prototype.line = 0; + ResourceErrorDetail.prototype.resourceInfo = null; /** - * ErrorLocation column. - * @member {number} column - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * ResourceErrorDetail errorDetails. + * @member {Array.} errorDetails + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorLocation.prototype.column = 0; + ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; /** - * Creates a new ErrorLocation 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.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation instance + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance */ - ErrorLocation.create = function create(properties) { - return new ErrorLocation(properties); + ResourceErrorDetail.create = function create(properties) { + return new ResourceErrorDetail(properties); }; /** - * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.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.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorLocation} message ErrorLocation 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 */ - ErrorLocation.encode = function encode(message, writer) { + ResourceErrorDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.line != null && Object.hasOwnProperty.call(message, "line")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); + 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 ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.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.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorLocation} message ErrorLocation 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 */ - ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { + ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorLocation 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.ErrorLocation + * @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.ErrorLocation} ErrorLocation + * @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 */ - ErrorLocation.decode = function decode(reader, length) { + ResourceErrorDetail.decode = function decode(reader, length) { 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.ErrorLocation(); + 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(); switch (tag >>> 3) { case 1: { - message.line = reader.int32(); + message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); break; } case 2: { - message.column = reader.int32(); + 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: @@ -2123,135 +2346,163 @@ }; /** - * Decodes an ErrorLocation 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.ErrorLocation + * @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.ErrorLocation} ErrorLocation + * @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 */ - ErrorLocation.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 ErrorLocation message. + * Verifies a ResourceErrorDetail message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @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 */ - ErrorLocation.verify = function verify(message) { + ResourceErrorDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line)) - return "line: integer expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isInteger(message.column)) - return "column: integer expected"; - return null; - }; - - /** - * Creates an ErrorLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation - */ - ErrorLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorLocation) + if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) { + var error = $root.google.rpc.ResourceInfo.verify(message.resourceInfo); + if (error) + return "resourceInfo." + 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 a ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + */ + 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.ErrorLocation(); - if (object.line != null) - message.line = object.line | 0; - if (object.column != null) - message.column = object.column | 0; + 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.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 ErrorLocation 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.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ErrorLocation} message ErrorLocation + * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorLocation.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.line = 0; - object.column = 0; + object.resourceInfo = null; + object.errorCount = 0; } - if (message.line != null && message.hasOwnProperty("line")) - object.line = message.line; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; + 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 ErrorLocation to JSON. + * Converts this ResourceErrorDetail to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance * @returns {Object.} JSON object */ - ErrorLocation.prototype.toJSON = function toJSON() { + ResourceErrorDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ErrorLocation + * Gets the default type url for ResourceErrorDetail * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorLocation"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; }; - return ErrorLocation; + return ResourceErrorDetail; })(); - v2.TimeSeries = (function() { + v2.ErrorDetail = (function() { /** - * Properties of a TimeSeries. + * Properties of an ErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITimeSeries - * @property {string|null} [metric] TimeSeries metric - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind - * @property {Array.|null} [points] TimeSeries points + * @interface IErrorDetail + * @property {google.cloud.bigquery.migration.v2.IErrorLocation|null} [location] ErrorDetail location + * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo */ /** - * Constructs a new TimeSeries. + * Constructs a new ErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TimeSeries. - * @implements ITimeSeries + * @classdesc Represents an ErrorDetail. + * @implements IErrorDetail * @constructor - * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set */ - function TimeSeries(properties) { - this.points = []; + function ErrorDetail(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2259,120 +2510,89 @@ } /** - * TimeSeries metric. - * @member {string} metric - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @instance - */ - TimeSeries.prototype.metric = ""; - - /** - * TimeSeries valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @instance - */ - TimeSeries.prototype.valueType = 0; - - /** - * TimeSeries metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * ErrorDetail location. + * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @instance */ - TimeSeries.prototype.metricKind = 0; + ErrorDetail.prototype.location = null; /** - * TimeSeries points. - * @member {Array.} points - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * ErrorDetail errorInfo. + * @member {google.rpc.IErrorInfo|null|undefined} errorInfo + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @instance */ - TimeSeries.prototype.points = $util.emptyArray; + ErrorDetail.prototype.errorInfo = null; /** - * Creates a new TimeSeries instance using the specified properties. + * Creates a new ErrorDetail instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries instance + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance */ - TimeSeries.create = function create(properties) { - return new TimeSeries(properties); + ErrorDetail.create = function create(properties) { + return new ErrorDetail(properties); }; /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. + * 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.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ITimeSeries} message TimeSeries message or plain object to encode + * @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 */ - TimeSeries.encode = function encode(message, writer) { + ErrorDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metric); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.points != null && message.points.length) - for (var i = 0; i < message.points.length; ++i) - $root.google.cloud.bigquery.migration.v2.Point.encode(message.points[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + 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 TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. + * 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.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ITimeSeries} message TimeSeries message or plain object to encode + * @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 */ - TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeries message from the specified reader or buffer. + * Decodes an ErrorDetail message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @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.TimeSeries} TimeSeries + * @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 */ - TimeSeries.decode = function decode(reader, length) { + ErrorDetail.decode = function decode(reader, length) { 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.TimeSeries(); + 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(); switch (tag >>> 3) { case 1: { - message.metric = reader.string(); + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); break; } case 2: { - message.valueType = reader.int32(); - break; - } - case 3: { - message.metricKind = reader.int32(); - break; - } - case 4: { - if (!(message.points && message.points.length)) - message.points = []; - message.points.push($root.google.cloud.bigquery.migration.v2.Point.decode(reader, reader.uint32())); + message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); break; } default: @@ -2384,239 +2604,142 @@ }; /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @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.TimeSeries} TimeSeries + * @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 */ - TimeSeries.decodeDelimited = function decodeDelimited(reader) { + ErrorDetail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeries message. + * Verifies an ErrorDetail message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @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 */ - TimeSeries.verify = function verify(message) { + ErrorDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metric != null && message.hasOwnProperty("metric")) - if (!$util.isString(message.metric)) - return "metric: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - switch (message.metricKind) { - default: - return "metricKind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.points != null && message.hasOwnProperty("points")) { - if (!Array.isArray(message.points)) - return "points: array expected"; - for (var i = 0; i < message.points.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.Point.verify(message.points[i]); - if (error) - return "points." + error; - } + 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 a TimeSeries message from a plain object. Also converts values to their respective internal types. + * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail */ - TimeSeries.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TimeSeries) + 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.TimeSeries(); - if (object.metric != null) - message.metric = String(object.metric); - switch (object.valueType) { - default: - if (typeof object.valueType === "number") { - message.valueType = object.valueType; - break; - } - break; - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - case "DOUBLE": - case 3: - message.valueType = 3; - break; - case "STRING": - case 4: - message.valueType = 4; - break; - case "DISTRIBUTION": - case 5: - message.valueType = 5; - break; - case "MONEY": - case 6: - message.valueType = 6; - break; - } - switch (object.metricKind) { - default: - if (typeof object.metricKind === "number") { - message.metricKind = object.metricKind; - break; - } - break; - case "METRIC_KIND_UNSPECIFIED": - case 0: - message.metricKind = 0; - break; - case "GAUGE": - case 1: - message.metricKind = 1; - break; - case "DELTA": - case 2: - message.metricKind = 2; - break; - case "CUMULATIVE": - case 3: - message.metricKind = 3; - break; + 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.points) { - if (!Array.isArray(object.points)) - throw TypeError(".google.cloud.bigquery.migration.v2.TimeSeries.points: array expected"); - message.points = []; - for (var i = 0; i < object.points.length; ++i) { - if (typeof object.points[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TimeSeries.points: object expected"); - message.points[i] = $root.google.cloud.bigquery.migration.v2.Point.fromObject(object.points[i]); - } + 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 a TimeSeries message. Also converts values to other types if specified. + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.TimeSeries} message TimeSeries + * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeries.toObject = function toObject(message, options) { + ErrorDetail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.points = []; if (options.defaults) { - object.metric = ""; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - } - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = message.metric; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; - if (message.metricKind != null && message.hasOwnProperty("metricKind")) - object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] === undefined ? message.metricKind : $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; - if (message.points && message.points.length) { - object.points = []; - for (var j = 0; j < message.points.length; ++j) - object.points[j] = $root.google.cloud.bigquery.migration.v2.Point.toObject(message.points[j], options); + 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 TimeSeries to JSON. + * Converts this ErrorDetail to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @instance * @returns {Object.} JSON object */ - TimeSeries.prototype.toJSON = function toJSON() { + ErrorDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TimeSeries + * Gets the default type url for ErrorDetail * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeSeries"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; }; - return TimeSeries; + return ErrorDetail; })(); - v2.Point = (function() { + v2.ErrorLocation = (function() { /** - * Properties of a Point. + * Properties of an ErrorLocation. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPoint - * @property {google.cloud.bigquery.migration.v2.ITimeInterval|null} [interval] Point interval - * @property {google.cloud.bigquery.migration.v2.ITypedValue|null} [value] Point value + * @interface IErrorLocation + * @property {number|null} [line] ErrorLocation line + * @property {number|null} [column] ErrorLocation column */ /** - * Constructs a new Point. + * Constructs a new ErrorLocation. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a Point. - * @implements IPoint + * @classdesc Represents an ErrorLocation. + * @implements IErrorLocation * @constructor - * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set */ - function Point(properties) { + function ErrorLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2624,89 +2747,89 @@ } /** - * Point interval. - * @member {google.cloud.bigquery.migration.v2.ITimeInterval|null|undefined} interval - * @memberof google.cloud.bigquery.migration.v2.Point + * ErrorLocation line. + * @member {number} line + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @instance */ - Point.prototype.interval = null; + ErrorLocation.prototype.line = 0; /** - * Point value. - * @member {google.cloud.bigquery.migration.v2.ITypedValue|null|undefined} value - * @memberof google.cloud.bigquery.migration.v2.Point + * ErrorLocation column. + * @member {number} column + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @instance */ - Point.prototype.value = null; + ErrorLocation.prototype.column = 0; /** - * Creates a new Point instance using the specified properties. + * Creates a new ErrorLocation instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static - * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.Point} Point instance + * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation instance */ - Point.create = function create(properties) { - return new Point(properties); + ErrorLocation.create = function create(properties) { + return new ErrorLocation(properties); }; /** - * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. + * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static - * @param {google.cloud.bigquery.migration.v2.IPoint} message Point message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IErrorLocation} message ErrorLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Point.encode = function encode(message, writer) { + ErrorLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) - $root.google.cloud.bigquery.migration.v2.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.cloud.bigquery.migration.v2.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.line != null && Object.hasOwnProperty.call(message, "line")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); return writer; }; /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. + * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static - * @param {google.cloud.bigquery.migration.v2.IPoint} message Point message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IErrorLocation} message ErrorLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Point.encodeDelimited = function encodeDelimited(message, writer) { + ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Point message from the specified reader or buffer. + * Decodes an ErrorLocation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @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.Point} Point + * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Point.decode = function decode(reader, length) { + ErrorLocation.decode = function decode(reader, length) { 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.Point(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.decode(reader, reader.uint32()); + message.line = reader.int32(); break; } case 2: { - message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.decode(reader, reader.uint32()); + message.column = reader.int32(); break; } default: @@ -2718,142 +2841,135 @@ }; /** - * Decodes a Point message from the specified reader or buffer, length delimited. + * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.Point} Point + * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Point.decodeDelimited = function decodeDelimited(reader) { + ErrorLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Point message. + * Verifies an ErrorLocation message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Point.verify = function verify(message) { + ErrorLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.cloud.bigquery.migration.v2.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.cloud.bigquery.migration.v2.TypedValue.verify(message.value); - if (error) - return "value." + error; - } + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line)) + return "line: integer expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isInteger(message.column)) + return "column: integer expected"; return null; }; /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. + * Creates an ErrorLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.Point} Point + * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation */ - Point.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.Point) + ErrorLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorLocation) return object; - var message = new $root.google.cloud.bigquery.migration.v2.Point(); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Point.interval: object expected"); - message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.fromObject(object.interval); - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Point.value: object expected"); - message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.fromObject(object.value); - } + var message = new $root.google.cloud.bigquery.migration.v2.ErrorLocation(); + if (object.line != null) + message.line = object.line | 0; + if (object.column != null) + message.column = object.column | 0; return message; }; /** - * Creates a plain object from a Point message. Also converts values to other types if specified. + * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static - * @param {google.cloud.bigquery.migration.v2.Point} message Point + * @param {google.cloud.bigquery.migration.v2.ErrorLocation} message ErrorLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Point.toObject = function toObject(message, options) { + ErrorLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.interval = null; - object.value = null; + object.line = 0; + object.column = 0; } - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.toObject(message.interval, options); - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.cloud.bigquery.migration.v2.TypedValue.toObject(message.value, options); + if (message.line != null && message.hasOwnProperty("line")) + object.line = message.line; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; return object; }; /** - * Converts this Point to JSON. + * Converts this ErrorLocation to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @instance * @returns {Object.} JSON object */ - Point.prototype.toJSON = function toJSON() { + ErrorLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Point + * Gets the default type url for ErrorLocation * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Point + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Point"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorLocation"; }; - return Point; + return ErrorLocation; })(); - v2.TimeInterval = (function() { + v2.TimeSeries = (function() { /** - * Properties of a TimeInterval. + * Properties of a TimeSeries. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITimeInterval - * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime + * @interface ITimeSeries + * @property {string|null} [metric] TimeSeries metric + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind + * @property {Array.|null} [points] TimeSeries points */ /** - * Constructs a new TimeInterval. + * Constructs a new TimeSeries. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TimeInterval. - * @implements ITimeInterval + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries * @constructor - * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set */ - function TimeInterval(properties) { + function TimeSeries(properties) { + this.points = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2861,89 +2977,120 @@ } /** - * TimeInterval startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * TimeSeries metric. + * @member {string} metric + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @instance */ - TimeInterval.prototype.startTime = null; + TimeSeries.prototype.metric = ""; /** - * TimeInterval endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * TimeSeries valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @instance */ - TimeInterval.prototype.endTime = null; + TimeSeries.prototype.valueType = 0; /** - * Creates a new TimeInterval instance using the specified properties. + * TimeSeries metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @instance + */ + TimeSeries.prototype.metricKind = 0; + + /** + * TimeSeries points. + * @member {Array.} points + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @instance + */ + TimeSeries.prototype.points = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static - * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval instance + * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries instance */ - TimeInterval.create = function create(properties) { - return new TimeInterval(properties); + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); }; /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static - * @param {google.cloud.bigquery.migration.v2.ITimeInterval} message TimeInterval message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITimeSeries} message TimeSeries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeInterval.encode = function encode(message, writer) { + TimeSeries.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metric); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.points != null && message.points.length) + for (var i = 0; i < message.points.length; ++i) + $root.google.cloud.bigquery.migration.v2.Point.encode(message.points[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static - * @param {google.cloud.bigquery.migration.v2.ITimeInterval} message TimeInterval message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITimeSeries} message TimeSeries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeInterval message from the specified reader or buffer. + * Decodes a TimeSeries message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @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.TimeInterval} TimeInterval + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeInterval.decode = function decode(reader, length) { + TimeSeries.decode = function decode(reader, length) { 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.TimeInterval(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeSeries(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.metric = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.valueType = reader.int32(); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.google.cloud.bigquery.migration.v2.Point.decode(reader, reader.uint32())); break; } default: @@ -2955,145 +3102,239 @@ }; /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeInterval.decodeDelimited = function decodeDelimited(reader) { + TimeSeries.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeInterval message. + * Verifies a TimeSeries message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeInterval.verify = function verify(message) { + TimeSeries.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.metric != null && message.hasOwnProperty("metric")) + if (!$util.isString(message.metric)) + return "metric: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + switch (message.metricKind) { + default: + return "metricKind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.points != null && message.hasOwnProperty("points")) { + if (!Array.isArray(message.points)) + return "points: array expected"; + for (var i = 0; i < message.points.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.Point.verify(message.points[i]); + if (error) + return "points." + error; + } } return null; }; /** - * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries */ - TimeInterval.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TimeInterval) + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TimeSeries) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TimeInterval(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TimeInterval.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + var message = new $root.google.cloud.bigquery.migration.v2.TimeSeries(); + if (object.metric != null) + message.metric = String(object.metric); + switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + case "DOUBLE": + case 3: + message.valueType = 3; + break; + case "STRING": + case 4: + message.valueType = 4; + break; + case "DISTRIBUTION": + case 5: + message.valueType = 5; + break; + case "MONEY": + case 6: + message.valueType = 6; + break; } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TimeInterval.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + switch (object.metricKind) { + default: + if (typeof object.metricKind === "number") { + message.metricKind = object.metricKind; + break; + } + break; + case "METRIC_KIND_UNSPECIFIED": + case 0: + message.metricKind = 0; + break; + case "GAUGE": + case 1: + message.metricKind = 1; + break; + case "DELTA": + case 2: + message.metricKind = 2; + break; + case "CUMULATIVE": + case 3: + message.metricKind = 3; + break; + } + if (object.points) { + if (!Array.isArray(object.points)) + throw TypeError(".google.cloud.bigquery.migration.v2.TimeSeries.points: array expected"); + message.points = []; + for (var i = 0; i < object.points.length; ++i) { + if (typeof object.points[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TimeSeries.points: object expected"); + message.points[i] = $root.google.cloud.bigquery.migration.v2.Point.fromObject(object.points[i]); + } } return message; }; /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static - * @param {google.cloud.bigquery.migration.v2.TimeInterval} message TimeInterval + * @param {google.cloud.bigquery.migration.v2.TimeSeries} message TimeSeries * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeInterval.toObject = function toObject(message, options) { + TimeSeries.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.points = []; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.metric = ""; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + } + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = message.metric; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] === undefined ? message.metricKind : $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.points && message.points.length) { + object.points = []; + for (var j = 0; j < message.points.length; ++j) + object.points[j] = $root.google.cloud.bigquery.migration.v2.Point.toObject(message.points[j], options); } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this TimeInterval to JSON. + * Converts this TimeSeries to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @instance * @returns {Object.} JSON object */ - TimeInterval.prototype.toJSON = function toJSON() { + TimeSeries.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TimeInterval + * Gets the default type url for TimeSeries * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @memberof google.cloud.bigquery.migration.v2.TimeSeries * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeInterval"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeSeries"; }; - return TimeInterval; + return TimeSeries; })(); - v2.TypedValue = (function() { + v2.Point = (function() { /** - * Properties of a TypedValue. + * Properties of a Point. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITypedValue - * @property {boolean|null} [boolValue] TypedValue boolValue - * @property {number|Long|null} [int64Value] TypedValue int64Value - * @property {number|null} [doubleValue] TypedValue doubleValue - * @property {string|null} [stringValue] TypedValue stringValue - * @property {google.api.IDistribution|null} [distributionValue] TypedValue distributionValue + * @interface IPoint + * @property {google.cloud.bigquery.migration.v2.ITimeInterval|null} [interval] Point interval + * @property {google.cloud.bigquery.migration.v2.ITypedValue|null} [value] Point value */ /** - * Constructs a new TypedValue. + * Constructs a new Point. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TypedValue. - * @implements ITypedValue + * @classdesc Represents a Point. + * @implements IPoint * @constructor - * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set */ - function TypedValue(properties) { + function Point(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3101,145 +3342,89 @@ } /** - * TypedValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @instance - */ - TypedValue.prototype.boolValue = null; - - /** - * TypedValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @instance - */ - TypedValue.prototype.int64Value = null; - - /** - * TypedValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @instance - */ - TypedValue.prototype.doubleValue = null; - - /** - * TypedValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @instance - */ - TypedValue.prototype.stringValue = null; - - /** - * TypedValue distributionValue. - * @member {google.api.IDistribution|null|undefined} distributionValue - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * Point interval. + * @member {google.cloud.bigquery.migration.v2.ITimeInterval|null|undefined} interval + * @memberof google.cloud.bigquery.migration.v2.Point * @instance */ - TypedValue.prototype.distributionValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Point.prototype.interval = null; /** - * TypedValue value. - * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * Point value. + * @member {google.cloud.bigquery.migration.v2.ITypedValue|null|undefined} value + * @memberof google.cloud.bigquery.migration.v2.Point * @instance */ - Object.defineProperty(TypedValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + Point.prototype.value = null; /** - * Creates a new TypedValue instance using the specified properties. + * Creates a new Point instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static - * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue instance + * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.Point} Point instance */ - TypedValue.create = function create(properties) { - return new TypedValue(properties); + Point.create = function create(properties) { + return new Point(properties); }; /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. + * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static - * @param {google.cloud.bigquery.migration.v2.ITypedValue} message TypedValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPoint} message Point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypedValue.encode = function encode(message, writer) { + Point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.distributionValue != null && Object.hasOwnProperty.call(message, "distributionValue")) - $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.cloud.bigquery.migration.v2.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.bigquery.migration.v2.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static - * @param {google.cloud.bigquery.migration.v2.ITypedValue} message TypedValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPoint} message Point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + Point.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TypedValue message from the specified reader or buffer. + * Decodes a Point message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @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.TypedValue} TypedValue + * @returns {google.cloud.bigquery.migration.v2.Point} Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypedValue.decode = function decode(reader, length) { + Point.decode = function decode(reader, length) { 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.TypedValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Point(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.boolValue = reader.bool(); + message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.decode(reader, reader.uint32()); break; } case 2: { - message.int64Value = reader.int64(); - break; - } - case 3: { - message.doubleValue = reader.double(); - break; - } - case 4: { - message.stringValue = reader.string(); - break; - } - case 5: { - message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); + message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.decode(reader, reader.uint32()); break; } default: @@ -3251,204 +3436,142 @@ }; /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * Decodes a Point message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue + * @returns {google.cloud.bigquery.migration.v2.Point} Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypedValue.decodeDelimited = function decodeDelimited(reader) { + Point.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TypedValue message. + * Verifies a Point message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TypedValue.verify = function verify(message) { + Point.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.cloud.bigquery.migration.v2.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; } - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.api.Distribution.verify(message.distributionValue); - if (error) - return "distributionValue." + error; - } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.cloud.bigquery.migration.v2.TypedValue.verify(message.value); + if (error) + return "value." + error; } return null; }; /** - * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. + * Creates a Point message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue + * @returns {google.cloud.bigquery.migration.v2.Point} Point */ - TypedValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TypedValue) + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.Point) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TypedValue(); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.distributionValue != null) { - if (typeof object.distributionValue !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TypedValue.distributionValue: object expected"); - message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); + var message = new $root.google.cloud.bigquery.migration.v2.Point(); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Point.interval: object expected"); + message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.fromObject(object.interval); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Point.value: object expected"); + message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.fromObject(object.value); } return message; }; /** - * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * Creates a plain object from a Point message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static - * @param {google.cloud.bigquery.migration.v2.TypedValue} message TypedValue + * @param {google.cloud.bigquery.migration.v2.Point} message Point * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TypedValue.toObject = function toObject(message, options) { + Point.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.value = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { - object.distributionValue = $root.google.api.Distribution.toObject(message.distributionValue, options); - if (options.oneofs) - object.value = "distributionValue"; + if (options.defaults) { + object.interval = null; + object.value = null; } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.toObject(message.interval, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.cloud.bigquery.migration.v2.TypedValue.toObject(message.value, options); return object; }; /** - * Converts this TypedValue to JSON. + * Converts this Point to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @instance * @returns {Object.} JSON object */ - TypedValue.prototype.toJSON = function toJSON() { + Point.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TypedValue + * Gets the default type url for Point * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @memberof google.cloud.bigquery.migration.v2.Point * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TypedValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TypedValue"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Point"; }; - return TypedValue; + return Point; })(); - v2.TranslationConfigDetails = (function() { + v2.TimeInterval = (function() { /** - * Properties of a TranslationConfigDetails. + * Properties of a TimeInterval. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationConfigDetails - * @property {string|null} [gcsSourcePath] TranslationConfigDetails gcsSourcePath - * @property {string|null} [gcsTargetPath] TranslationConfigDetails gcsTargetPath - * @property {google.cloud.bigquery.migration.v2.IObjectNameMappingList|null} [nameMappingList] TranslationConfigDetails nameMappingList - * @property {google.cloud.bigquery.migration.v2.IDialect|null} [sourceDialect] TranslationConfigDetails sourceDialect - * @property {google.cloud.bigquery.migration.v2.IDialect|null} [targetDialect] TranslationConfigDetails targetDialect - * @property {google.cloud.bigquery.migration.v2.ISourceEnv|null} [sourceEnv] TranslationConfigDetails sourceEnv - * @property {string|null} [requestSource] TranslationConfigDetails requestSource + * @interface ITimeInterval + * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime */ /** - * Constructs a new TranslationConfigDetails. + * Constructs a new TimeInterval. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationConfigDetails. - * @implements ITranslationConfigDetails + * @classdesc Represents a TimeInterval. + * @implements ITimeInterval * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set */ - function TranslationConfigDetails(properties) { + function TimeInterval(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3456,195 +3579,89 @@ } /** - * TranslationConfigDetails gcsSourcePath. - * @member {string|null|undefined} gcsSourcePath - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * TimeInterval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @instance */ - TranslationConfigDetails.prototype.gcsSourcePath = null; + TimeInterval.prototype.startTime = null; /** - * TranslationConfigDetails gcsTargetPath. - * @member {string|null|undefined} gcsTargetPath - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * TimeInterval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @instance */ - TranslationConfigDetails.prototype.gcsTargetPath = null; + TimeInterval.prototype.endTime = null; /** - * TranslationConfigDetails nameMappingList. - * @member {google.cloud.bigquery.migration.v2.IObjectNameMappingList|null|undefined} nameMappingList - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance + * Creates a new TimeInterval instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval instance */ - TranslationConfigDetails.prototype.nameMappingList = null; + TimeInterval.create = function create(properties) { + return new TimeInterval(properties); + }; /** - * TranslationConfigDetails sourceDialect. - * @member {google.cloud.bigquery.migration.v2.IDialect|null|undefined} sourceDialect - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance + * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - TranslationConfigDetails.prototype.sourceDialect = null; + TimeInterval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * TranslationConfigDetails targetDialect. - * @member {google.cloud.bigquery.migration.v2.IDialect|null|undefined} targetDialect - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - TranslationConfigDetails.prototype.targetDialect = null; - - /** - * TranslationConfigDetails sourceEnv. - * @member {google.cloud.bigquery.migration.v2.ISourceEnv|null|undefined} sourceEnv - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - TranslationConfigDetails.prototype.sourceEnv = null; - - /** - * TranslationConfigDetails requestSource. - * @member {string} requestSource - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - TranslationConfigDetails.prototype.requestSource = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TranslationConfigDetails sourceLocation. - * @member {"gcsSourcePath"|undefined} sourceLocation - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - Object.defineProperty(TranslationConfigDetails.prototype, "sourceLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsSourcePath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * TranslationConfigDetails targetLocation. - * @member {"gcsTargetPath"|undefined} targetLocation - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - Object.defineProperty(TranslationConfigDetails.prototype, "targetLocation", { - get: $util.oneOfGetter($oneOfFields = ["gcsTargetPath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * TranslationConfigDetails outputNameMapping. - * @member {"nameMappingList"|undefined} outputNameMapping - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @instance - */ - Object.defineProperty(TranslationConfigDetails.prototype, "outputNameMapping", { - get: $util.oneOfGetter($oneOfFields = ["nameMappingList"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TranslationConfigDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails instance - */ - TranslationConfigDetails.create = function create(properties) { - return new TranslationConfigDetails(properties); - }; - - /** - * Encodes the specified TranslationConfigDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails - * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails} message TranslationConfigDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationConfigDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsSourcePath != null && Object.hasOwnProperty.call(message, "gcsSourcePath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsSourcePath); - if (message.gcsTargetPath != null && Object.hasOwnProperty.call(message, "gcsTargetPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsTargetPath); - if (message.sourceDialect != null && Object.hasOwnProperty.call(message, "sourceDialect")) - $root.google.cloud.bigquery.migration.v2.Dialect.encode(message.sourceDialect, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetDialect != null && Object.hasOwnProperty.call(message, "targetDialect")) - $root.google.cloud.bigquery.migration.v2.Dialect.encode(message.targetDialect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nameMappingList != null && Object.hasOwnProperty.call(message, "nameMappingList")) - $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.encode(message.nameMappingList, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sourceEnv != null && Object.hasOwnProperty.call(message, "sourceEnv")) - $root.google.cloud.bigquery.migration.v2.SourceEnv.encode(message.sourceEnv, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.requestSource != null && Object.hasOwnProperty.call(message, "requestSource")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.requestSource); - return writer; - }; - - /** - * Encodes the specified TranslationConfigDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails} message TranslationConfigDetails message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITimeInterval} message TimeInterval message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationConfigDetails message from the specified reader or buffer. + * Decodes a TimeInterval message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @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.TranslationConfigDetails} TranslationConfigDetails + * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationConfigDetails.decode = function decode(reader, length) { + TimeInterval.decode = function decode(reader, length) { 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.TranslationConfigDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeInterval(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsSourcePath = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.gcsTargetPath = reader.string(); - break; - } - case 5: { - message.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.decode(reader, reader.uint32()); - break; - } - case 4: { - message.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.decode(reader, reader.uint32()); - break; - } - case 6: { - message.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.decode(reader, reader.uint32()); - break; - } - case 8: { - message.requestSource = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -3656,218 +3673,145 @@ }; /** - * Decodes a TranslationConfigDetails message from the specified reader or buffer, length delimited. + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails + * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationConfigDetails.decodeDelimited = function decodeDelimited(reader) { + TimeInterval.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationConfigDetails message. + * Verifies a TimeInterval message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationConfigDetails.verify = function verify(message) { + TimeInterval.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSourcePath != null && message.hasOwnProperty("gcsSourcePath")) { - properties.sourceLocation = 1; - if (!$util.isString(message.gcsSourcePath)) - return "gcsSourcePath: string expected"; - } - if (message.gcsTargetPath != null && message.hasOwnProperty("gcsTargetPath")) { - properties.targetLocation = 1; - if (!$util.isString(message.gcsTargetPath)) - return "gcsTargetPath: string expected"; - } - if (message.nameMappingList != null && message.hasOwnProperty("nameMappingList")) { - properties.outputNameMapping = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify(message.nameMappingList); - if (error) - return "nameMappingList." + error; - } - } - if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) { - var error = $root.google.cloud.bigquery.migration.v2.Dialect.verify(message.sourceDialect); - if (error) - return "sourceDialect." + error; - } - if (message.targetDialect != null && message.hasOwnProperty("targetDialect")) { - var error = $root.google.cloud.bigquery.migration.v2.Dialect.verify(message.targetDialect); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "targetDialect." + error; + return "startTime." + error; } - if (message.sourceEnv != null && message.hasOwnProperty("sourceEnv")) { - var error = $root.google.cloud.bigquery.migration.v2.SourceEnv.verify(message.sourceEnv); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "sourceEnv." + error; + return "endTime." + error; } - if (message.requestSource != null && message.hasOwnProperty("requestSource")) - if (!$util.isString(message.requestSource)) - return "requestSource: string expected"; return null; }; /** - * Creates a TranslationConfigDetails message from a plain object. Also converts values to their respective internal types. + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails + * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval */ - TranslationConfigDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails) + TimeInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TimeInterval) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails(); - if (object.gcsSourcePath != null) - message.gcsSourcePath = String(object.gcsSourcePath); - if (object.gcsTargetPath != null) - message.gcsTargetPath = String(object.gcsTargetPath); - if (object.nameMappingList != null) { - if (typeof object.nameMappingList !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.nameMappingList: object expected"); - message.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.fromObject(object.nameMappingList); - } - if (object.sourceDialect != null) { - if (typeof object.sourceDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.sourceDialect: object expected"); - message.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.fromObject(object.sourceDialect); - } - if (object.targetDialect != null) { - if (typeof object.targetDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.targetDialect: object expected"); - message.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.fromObject(object.targetDialect); + var message = new $root.google.cloud.bigquery.migration.v2.TimeInterval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TimeInterval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } - if (object.sourceEnv != null) { - if (typeof object.sourceEnv !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.sourceEnv: object expected"); - message.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.fromObject(object.sourceEnv); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TimeInterval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } - if (object.requestSource != null) - message.requestSource = String(object.requestSource); return message; }; /** - * Creates a plain object from a TranslationConfigDetails message. Also converts values to other types if specified. + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static - * @param {google.cloud.bigquery.migration.v2.TranslationConfigDetails} message TranslationConfigDetails + * @param {google.cloud.bigquery.migration.v2.TimeInterval} message TimeInterval * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationConfigDetails.toObject = function toObject(message, options) { + TimeInterval.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.sourceDialect = null; - object.targetDialect = null; - object.sourceEnv = null; - object.requestSource = ""; - } - if (message.gcsSourcePath != null && message.hasOwnProperty("gcsSourcePath")) { - object.gcsSourcePath = message.gcsSourcePath; - if (options.oneofs) - object.sourceLocation = "gcsSourcePath"; + object.startTime = null; + object.endTime = null; } - if (message.gcsTargetPath != null && message.hasOwnProperty("gcsTargetPath")) { - object.gcsTargetPath = message.gcsTargetPath; - if (options.oneofs) - object.targetLocation = "gcsTargetPath"; - } - if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) - object.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.toObject(message.sourceDialect, options); - if (message.targetDialect != null && message.hasOwnProperty("targetDialect")) - object.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.toObject(message.targetDialect, options); - if (message.nameMappingList != null && message.hasOwnProperty("nameMappingList")) { - object.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.toObject(message.nameMappingList, options); - if (options.oneofs) - object.outputNameMapping = "nameMappingList"; - } - if (message.sourceEnv != null && message.hasOwnProperty("sourceEnv")) - object.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.toObject(message.sourceEnv, options); - if (message.requestSource != null && message.hasOwnProperty("requestSource")) - object.requestSource = message.requestSource; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this TranslationConfigDetails to JSON. + * Converts this TimeInterval to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @instance * @returns {Object.} JSON object */ - TranslationConfigDetails.prototype.toJSON = function toJSON() { + TimeInterval.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TranslationConfigDetails + * Gets the default type url for TimeInterval * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.TimeInterval * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TranslationConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationConfigDetails"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeInterval"; }; - return TranslationConfigDetails; + return TimeInterval; })(); - v2.Dialect = (function() { + v2.TypedValue = (function() { /** - * Properties of a Dialect. + * Properties of a TypedValue. * @memberof google.cloud.bigquery.migration.v2 - * @interface IDialect - * @property {google.cloud.bigquery.migration.v2.IBigQueryDialect|null} [bigqueryDialect] Dialect bigqueryDialect - * @property {google.cloud.bigquery.migration.v2.IHiveQLDialect|null} [hiveqlDialect] Dialect hiveqlDialect - * @property {google.cloud.bigquery.migration.v2.IRedshiftDialect|null} [redshiftDialect] Dialect redshiftDialect - * @property {google.cloud.bigquery.migration.v2.ITeradataDialect|null} [teradataDialect] Dialect teradataDialect - * @property {google.cloud.bigquery.migration.v2.IOracleDialect|null} [oracleDialect] Dialect oracleDialect - * @property {google.cloud.bigquery.migration.v2.ISparkSQLDialect|null} [sparksqlDialect] Dialect sparksqlDialect - * @property {google.cloud.bigquery.migration.v2.ISnowflakeDialect|null} [snowflakeDialect] Dialect snowflakeDialect - * @property {google.cloud.bigquery.migration.v2.INetezzaDialect|null} [netezzaDialect] Dialect netezzaDialect - * @property {google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null} [azureSynapseDialect] Dialect azureSynapseDialect - * @property {google.cloud.bigquery.migration.v2.IVerticaDialect|null} [verticaDialect] Dialect verticaDialect - * @property {google.cloud.bigquery.migration.v2.ISQLServerDialect|null} [sqlServerDialect] Dialect sqlServerDialect - * @property {google.cloud.bigquery.migration.v2.IPostgresqlDialect|null} [postgresqlDialect] Dialect postgresqlDialect - * @property {google.cloud.bigquery.migration.v2.IPrestoDialect|null} [prestoDialect] Dialect prestoDialect - * @property {google.cloud.bigquery.migration.v2.IMySQLDialect|null} [mysqlDialect] Dialect mysqlDialect + * @interface ITypedValue + * @property {boolean|null} [boolValue] TypedValue boolValue + * @property {number|Long|null} [int64Value] TypedValue int64Value + * @property {number|null} [doubleValue] TypedValue doubleValue + * @property {string|null} [stringValue] TypedValue stringValue + * @property {google.api.IDistribution|null} [distributionValue] TypedValue distributionValue */ /** - * Constructs a new Dialect. + * Constructs a new TypedValue. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a Dialect. - * @implements IDialect + * @classdesc Represents a TypedValue. + * @implements ITypedValue * @constructor - * @param {google.cloud.bigquery.migration.v2.IDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set */ - function Dialect(properties) { + function TypedValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3875,271 +3819,145 @@ } /** - * Dialect bigqueryDialect. - * @member {google.cloud.bigquery.migration.v2.IBigQueryDialect|null|undefined} bigqueryDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.bigqueryDialect = null; - - /** - * Dialect hiveqlDialect. - * @member {google.cloud.bigquery.migration.v2.IHiveQLDialect|null|undefined} hiveqlDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.hiveqlDialect = null; - - /** - * Dialect redshiftDialect. - * @member {google.cloud.bigquery.migration.v2.IRedshiftDialect|null|undefined} redshiftDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.redshiftDialect = null; - - /** - * Dialect teradataDialect. - * @member {google.cloud.bigquery.migration.v2.ITeradataDialect|null|undefined} teradataDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.teradataDialect = null; - - /** - * Dialect oracleDialect. - * @member {google.cloud.bigquery.migration.v2.IOracleDialect|null|undefined} oracleDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.oracleDialect = null; - - /** - * Dialect sparksqlDialect. - * @member {google.cloud.bigquery.migration.v2.ISparkSQLDialect|null|undefined} sparksqlDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.sparksqlDialect = null; - - /** - * Dialect snowflakeDialect. - * @member {google.cloud.bigquery.migration.v2.ISnowflakeDialect|null|undefined} snowflakeDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.snowflakeDialect = null; - - /** - * Dialect netezzaDialect. - * @member {google.cloud.bigquery.migration.v2.INetezzaDialect|null|undefined} netezzaDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.netezzaDialect = null; - - /** - * Dialect azureSynapseDialect. - * @member {google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null|undefined} azureSynapseDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect - * @instance - */ - Dialect.prototype.azureSynapseDialect = null; - - /** - * Dialect verticaDialect. - * @member {google.cloud.bigquery.migration.v2.IVerticaDialect|null|undefined} verticaDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Dialect.prototype.verticaDialect = null; + TypedValue.prototype.boolValue = null; /** - * Dialect sqlServerDialect. - * @member {google.cloud.bigquery.migration.v2.ISQLServerDialect|null|undefined} sqlServerDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Dialect.prototype.sqlServerDialect = null; + TypedValue.prototype.int64Value = null; /** - * Dialect postgresqlDialect. - * @member {google.cloud.bigquery.migration.v2.IPostgresqlDialect|null|undefined} postgresqlDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Dialect.prototype.postgresqlDialect = null; + TypedValue.prototype.doubleValue = null; /** - * Dialect prestoDialect. - * @member {google.cloud.bigquery.migration.v2.IPrestoDialect|null|undefined} prestoDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Dialect.prototype.prestoDialect = null; + TypedValue.prototype.stringValue = null; /** - * Dialect mysqlDialect. - * @member {google.cloud.bigquery.migration.v2.IMySQLDialect|null|undefined} mysqlDialect - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue distributionValue. + * @member {google.api.IDistribution|null|undefined} distributionValue + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Dialect.prototype.mysqlDialect = null; + TypedValue.prototype.distributionValue = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Dialect dialectValue. - * @member {"bigqueryDialect"|"hiveqlDialect"|"redshiftDialect"|"teradataDialect"|"oracleDialect"|"sparksqlDialect"|"snowflakeDialect"|"netezzaDialect"|"azureSynapseDialect"|"verticaDialect"|"sqlServerDialect"|"postgresqlDialect"|"prestoDialect"|"mysqlDialect"|undefined} dialectValue - * @memberof google.cloud.bigquery.migration.v2.Dialect + * TypedValue value. + * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @instance */ - Object.defineProperty(Dialect.prototype, "dialectValue", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryDialect", "hiveqlDialect", "redshiftDialect", "teradataDialect", "oracleDialect", "sparksqlDialect", "snowflakeDialect", "netezzaDialect", "azureSynapseDialect", "verticaDialect", "sqlServerDialect", "postgresqlDialect", "prestoDialect", "mysqlDialect"]), + Object.defineProperty(TypedValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Dialect instance using the specified properties. + * Creates a new TypedValue instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @static - * @param {google.cloud.bigquery.migration.v2.IDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect instance + * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue instance */ - Dialect.create = function create(properties) { - return new Dialect(properties); + TypedValue.create = function create(properties) { + return new TypedValue(properties); }; /** - * Encodes the specified Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @static - * @param {google.cloud.bigquery.migration.v2.IDialect} message Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITypedValue} message TypedValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dialect.encode = function encode(message, writer) { + TypedValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigqueryDialect != null && Object.hasOwnProperty.call(message, "bigqueryDialect")) - $root.google.cloud.bigquery.migration.v2.BigQueryDialect.encode(message.bigqueryDialect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.hiveqlDialect != null && Object.hasOwnProperty.call(message, "hiveqlDialect")) - $root.google.cloud.bigquery.migration.v2.HiveQLDialect.encode(message.hiveqlDialect, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.redshiftDialect != null && Object.hasOwnProperty.call(message, "redshiftDialect")) - $root.google.cloud.bigquery.migration.v2.RedshiftDialect.encode(message.redshiftDialect, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.teradataDialect != null && Object.hasOwnProperty.call(message, "teradataDialect")) - $root.google.cloud.bigquery.migration.v2.TeradataDialect.encode(message.teradataDialect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.oracleDialect != null && Object.hasOwnProperty.call(message, "oracleDialect")) - $root.google.cloud.bigquery.migration.v2.OracleDialect.encode(message.oracleDialect, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sparksqlDialect != null && Object.hasOwnProperty.call(message, "sparksqlDialect")) - $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.encode(message.sparksqlDialect, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.snowflakeDialect != null && Object.hasOwnProperty.call(message, "snowflakeDialect")) - $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.encode(message.snowflakeDialect, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.netezzaDialect != null && Object.hasOwnProperty.call(message, "netezzaDialect")) - $root.google.cloud.bigquery.migration.v2.NetezzaDialect.encode(message.netezzaDialect, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.azureSynapseDialect != null && Object.hasOwnProperty.call(message, "azureSynapseDialect")) - $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.encode(message.azureSynapseDialect, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.verticaDialect != null && Object.hasOwnProperty.call(message, "verticaDialect")) - $root.google.cloud.bigquery.migration.v2.VerticaDialect.encode(message.verticaDialect, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.sqlServerDialect != null && Object.hasOwnProperty.call(message, "sqlServerDialect")) - $root.google.cloud.bigquery.migration.v2.SQLServerDialect.encode(message.sqlServerDialect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.postgresqlDialect != null && Object.hasOwnProperty.call(message, "postgresqlDialect")) - $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.encode(message.postgresqlDialect, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.prestoDialect != null && Object.hasOwnProperty.call(message, "prestoDialect")) - $root.google.cloud.bigquery.migration.v2.PrestoDialect.encode(message.prestoDialect, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.mysqlDialect != null && Object.hasOwnProperty.call(message, "mysqlDialect")) - $root.google.cloud.bigquery.migration.v2.MySQLDialect.encode(message.mysqlDialect, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.distributionValue != null && Object.hasOwnProperty.call(message, "distributionValue")) + $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @static - * @param {google.cloud.bigquery.migration.v2.IDialect} message Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITypedValue} message TypedValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dialect.encodeDelimited = function encodeDelimited(message, writer) { + TypedValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dialect message from the specified reader or buffer. + * Decodes a TypedValue message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @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.Dialect} Dialect + * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dialect.decode = function decode(reader, length) { + TypedValue.decode = function decode(reader, length) { 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.Dialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TypedValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.decode(reader, reader.uint32()); + message.boolValue = reader.bool(); break; } case 2: { - message.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.decode(reader, reader.uint32()); + message.int64Value = reader.int64(); break; } case 3: { - message.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.decode(reader, reader.uint32()); + message.doubleValue = reader.double(); break; } case 4: { - message.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.decode(reader, reader.uint32()); + message.stringValue = reader.string(); break; } case 5: { - message.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.decode(reader, reader.uint32()); - break; - } - case 6: { - message.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.decode(reader, reader.uint32()); - break; - } - case 7: { - message.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.decode(reader, reader.uint32()); - break; - } - case 8: { - message.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.decode(reader, reader.uint32()); - break; - } - case 9: { - message.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.decode(reader, reader.uint32()); - break; - } - case 10: { - message.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.decode(reader, reader.uint32()); - break; - } - case 11: { - message.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.decode(reader, reader.uint32()); - break; - } - case 12: { - message.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.decode(reader, reader.uint32()); - break; - } - case 13: { - message.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.decode(reader, reader.uint32()); - break; - } - case 14: { - message.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.decode(reader, reader.uint32()); + message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); break; } default: @@ -4151,132 +3969,1117 @@ }; /** - * Decodes a Dialect message from the specified reader or buffer, length delimited. + * Decodes a TypedValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect + * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dialect.decodeDelimited = function decodeDelimited(reader) { + TypedValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dialect message. + * Verifies a TypedValue message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.TypedValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dialect.verify = function verify(message) { + TypedValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.verify(message.bigqueryDialect); - if (error) - return "bigqueryDialect." + error; - } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; } - if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.verify(message.hiveqlDialect); - if (error) - return "hiveqlDialect." + error; - } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; } - if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.verify(message.redshiftDialect); - if (error) - return "redshiftDialect." + error; - } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; } - if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TeradataDialect.verify(message.teradataDialect); - if (error) - return "teradataDialect." + error; - } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; } - if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; { - var error = $root.google.cloud.bigquery.migration.v2.OracleDialect.verify(message.oracleDialect); + var error = $root.google.api.Distribution.verify(message.distributionValue); if (error) - return "oracleDialect." + error; + return "distributionValue." + error; } } - if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.verify(message.sparksqlDialect); - if (error) - return "sparksqlDialect." + error; - } + return null; + }; + + /** + * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue + */ + TypedValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TypedValue) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.TypedValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.distributionValue != null) { + if (typeof object.distributionValue !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TypedValue.distributionValue: object expected"); + message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); } - if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.verify(message.snowflakeDialect); - if (error) - return "snowflakeDialect." + error; - } + return message; + }; + + /** + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2.TypedValue} message TypedValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypedValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; } - if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.verify(message.netezzaDialect); - if (error) - return "netezzaDialect." + error; - } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.value = "int64Value"; } - if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify(message.azureSynapseDialect); - if (error) - return "azureSynapseDialect." + error; - } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; } - if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.VerticaDialect.verify(message.verticaDialect); - if (error) - return "verticaDialect." + error; - } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; } - if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { + object.distributionValue = $root.google.api.Distribution.toObject(message.distributionValue, options); + if (options.oneofs) + object.value = "distributionValue"; + } + return object; + }; + + /** + * Converts this TypedValue to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @instance + * @returns {Object.} JSON object + */ + TypedValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypedValue + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypedValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TypedValue"; + }; + + return TypedValue; + })(); + + v2.TranslationConfigDetails = (function() { + + /** + * Properties of a TranslationConfigDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITranslationConfigDetails + * @property {string|null} [gcsSourcePath] TranslationConfigDetails gcsSourcePath + * @property {string|null} [gcsTargetPath] TranslationConfigDetails gcsTargetPath + * @property {google.cloud.bigquery.migration.v2.IObjectNameMappingList|null} [nameMappingList] TranslationConfigDetails nameMappingList + * @property {google.cloud.bigquery.migration.v2.IDialect|null} [sourceDialect] TranslationConfigDetails sourceDialect + * @property {google.cloud.bigquery.migration.v2.IDialect|null} [targetDialect] TranslationConfigDetails targetDialect + * @property {google.cloud.bigquery.migration.v2.ISourceEnv|null} [sourceEnv] TranslationConfigDetails sourceEnv + * @property {string|null} [requestSource] TranslationConfigDetails requestSource + * @property {Array.|null} [targetTypes] TranslationConfigDetails targetTypes + */ + + /** + * Constructs a new TranslationConfigDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TranslationConfigDetails. + * @implements ITranslationConfigDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails=} [properties] Properties to set + */ + function TranslationConfigDetails(properties) { + 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]]; + } + + /** + * TranslationConfigDetails gcsSourcePath. + * @member {string|null|undefined} gcsSourcePath + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.gcsSourcePath = null; + + /** + * TranslationConfigDetails gcsTargetPath. + * @member {string|null|undefined} gcsTargetPath + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.gcsTargetPath = null; + + /** + * TranslationConfigDetails nameMappingList. + * @member {google.cloud.bigquery.migration.v2.IObjectNameMappingList|null|undefined} nameMappingList + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.nameMappingList = null; + + /** + * TranslationConfigDetails sourceDialect. + * @member {google.cloud.bigquery.migration.v2.IDialect|null|undefined} sourceDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.sourceDialect = null; + + /** + * TranslationConfigDetails targetDialect. + * @member {google.cloud.bigquery.migration.v2.IDialect|null|undefined} targetDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.targetDialect = null; + + /** + * TranslationConfigDetails sourceEnv. + * @member {google.cloud.bigquery.migration.v2.ISourceEnv|null|undefined} sourceEnv + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.sourceEnv = null; + + /** + * TranslationConfigDetails requestSource. + * @member {string} requestSource + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.requestSource = ""; + + /** + * TranslationConfigDetails targetTypes. + * @member {Array.} targetTypes + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + TranslationConfigDetails.prototype.targetTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TranslationConfigDetails sourceLocation. + * @member {"gcsSourcePath"|undefined} sourceLocation + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + Object.defineProperty(TranslationConfigDetails.prototype, "sourceLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsSourcePath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TranslationConfigDetails targetLocation. + * @member {"gcsTargetPath"|undefined} targetLocation + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + Object.defineProperty(TranslationConfigDetails.prototype, "targetLocation", { + get: $util.oneOfGetter($oneOfFields = ["gcsTargetPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TranslationConfigDetails outputNameMapping. + * @member {"nameMappingList"|undefined} outputNameMapping + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + */ + Object.defineProperty(TranslationConfigDetails.prototype, "outputNameMapping", { + get: $util.oneOfGetter($oneOfFields = ["nameMappingList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TranslationConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails instance + */ + TranslationConfigDetails.create = function create(properties) { + return new TranslationConfigDetails(properties); + }; + + /** + * Encodes the specified TranslationConfigDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails} message TranslationConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSourcePath != null && Object.hasOwnProperty.call(message, "gcsSourcePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsSourcePath); + if (message.gcsTargetPath != null && Object.hasOwnProperty.call(message, "gcsTargetPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsTargetPath); + if (message.sourceDialect != null && Object.hasOwnProperty.call(message, "sourceDialect")) + $root.google.cloud.bigquery.migration.v2.Dialect.encode(message.sourceDialect, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetDialect != null && Object.hasOwnProperty.call(message, "targetDialect")) + $root.google.cloud.bigquery.migration.v2.Dialect.encode(message.targetDialect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nameMappingList != null && Object.hasOwnProperty.call(message, "nameMappingList")) + $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.encode(message.nameMappingList, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sourceEnv != null && Object.hasOwnProperty.call(message, "sourceEnv")) + $root.google.cloud.bigquery.migration.v2.SourceEnv.encode(message.sourceEnv, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.requestSource != null && Object.hasOwnProperty.call(message, "requestSource")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.requestSource); + if (message.targetTypes != null && message.targetTypes.length) + for (var i = 0; i < message.targetTypes.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.targetTypes[i]); + return writer; + }; + + /** + * Encodes the specified TranslationConfigDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationConfigDetails} message TranslationConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @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.TranslationConfigDetails} TranslationConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationConfigDetails.decode = function decode(reader, length) { + 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.TranslationConfigDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcsSourcePath = reader.string(); + break; + } + case 2: { + message.gcsTargetPath = reader.string(); + break; + } + case 5: { + message.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.decode(reader, reader.uint32()); + break; + } + case 4: { + message.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.decode(reader, reader.uint32()); + break; + } + case 6: { + message.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.decode(reader, reader.uint32()); + break; + } + case 8: { + message.requestSource = reader.string(); + break; + } + case 9: { + if (!(message.targetTypes && message.targetTypes.length)) + message.targetTypes = []; + message.targetTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationConfigDetails message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSourcePath != null && message.hasOwnProperty("gcsSourcePath")) { + properties.sourceLocation = 1; + if (!$util.isString(message.gcsSourcePath)) + return "gcsSourcePath: string expected"; + } + if (message.gcsTargetPath != null && message.hasOwnProperty("gcsTargetPath")) { + properties.targetLocation = 1; + if (!$util.isString(message.gcsTargetPath)) + return "gcsTargetPath: string expected"; + } + if (message.nameMappingList != null && message.hasOwnProperty("nameMappingList")) { + properties.outputNameMapping = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify(message.nameMappingList); + if (error) + return "nameMappingList." + error; + } + } + if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) { + var error = $root.google.cloud.bigquery.migration.v2.Dialect.verify(message.sourceDialect); + if (error) + return "sourceDialect." + error; + } + if (message.targetDialect != null && message.hasOwnProperty("targetDialect")) { + var error = $root.google.cloud.bigquery.migration.v2.Dialect.verify(message.targetDialect); + if (error) + return "targetDialect." + error; + } + if (message.sourceEnv != null && message.hasOwnProperty("sourceEnv")) { + var error = $root.google.cloud.bigquery.migration.v2.SourceEnv.verify(message.sourceEnv); + if (error) + return "sourceEnv." + error; + } + if (message.requestSource != null && message.hasOwnProperty("requestSource")) + if (!$util.isString(message.requestSource)) + return "requestSource: 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 TranslationConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TranslationConfigDetails} TranslationConfigDetails + */ + TranslationConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails(); + if (object.gcsSourcePath != null) + message.gcsSourcePath = String(object.gcsSourcePath); + if (object.gcsTargetPath != null) + message.gcsTargetPath = String(object.gcsTargetPath); + if (object.nameMappingList != null) { + if (typeof object.nameMappingList !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.nameMappingList: object expected"); + message.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.fromObject(object.nameMappingList); + } + if (object.sourceDialect != null) { + if (typeof object.sourceDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.sourceDialect: object expected"); + message.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.fromObject(object.sourceDialect); + } + if (object.targetDialect != null) { + if (typeof object.targetDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.targetDialect: object expected"); + message.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.fromObject(object.targetDialect); + } + if (object.sourceEnv != null) { + if (typeof object.sourceEnv !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.sourceEnv: object expected"); + message.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.fromObject(object.sourceEnv); + } + if (object.requestSource != null) + message.requestSource = String(object.requestSource); + if (object.targetTypes) { + if (!Array.isArray(object.targetTypes)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationConfigDetails.targetTypes: array expected"); + message.targetTypes = []; + for (var i = 0; i < object.targetTypes.length; ++i) + message.targetTypes[i] = String(object.targetTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a TranslationConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {google.cloud.bigquery.migration.v2.TranslationConfigDetails} message TranslationConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.targetTypes = []; + if (options.defaults) { + object.sourceDialect = null; + object.targetDialect = null; + object.sourceEnv = null; + object.requestSource = ""; + } + if (message.gcsSourcePath != null && message.hasOwnProperty("gcsSourcePath")) { + object.gcsSourcePath = message.gcsSourcePath; + if (options.oneofs) + object.sourceLocation = "gcsSourcePath"; + } + if (message.gcsTargetPath != null && message.hasOwnProperty("gcsTargetPath")) { + object.gcsTargetPath = message.gcsTargetPath; + if (options.oneofs) + object.targetLocation = "gcsTargetPath"; + } + if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) + object.sourceDialect = $root.google.cloud.bigquery.migration.v2.Dialect.toObject(message.sourceDialect, options); + if (message.targetDialect != null && message.hasOwnProperty("targetDialect")) + object.targetDialect = $root.google.cloud.bigquery.migration.v2.Dialect.toObject(message.targetDialect, options); + if (message.nameMappingList != null && message.hasOwnProperty("nameMappingList")) { + object.nameMappingList = $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList.toObject(message.nameMappingList, options); + if (options.oneofs) + object.outputNameMapping = "nameMappingList"; + } + if (message.sourceEnv != null && message.hasOwnProperty("sourceEnv")) + object.sourceEnv = $root.google.cloud.bigquery.migration.v2.SourceEnv.toObject(message.sourceEnv, options); + if (message.requestSource != null && message.hasOwnProperty("requestSource")) + object.requestSource = message.requestSource; + if (message.targetTypes && message.targetTypes.length) { + object.targetTypes = []; + for (var j = 0; j < message.targetTypes.length; ++j) + object.targetTypes[j] = message.targetTypes[j]; + } + return object; + }; + + /** + * Converts this TranslationConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @instance + * @returns {Object.} JSON object + */ + TranslationConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationConfigDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TranslationConfigDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationConfigDetails"; + }; + + return TranslationConfigDetails; + })(); + + v2.Dialect = (function() { + + /** + * Properties of a Dialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IDialect + * @property {google.cloud.bigquery.migration.v2.IBigQueryDialect|null} [bigqueryDialect] Dialect bigqueryDialect + * @property {google.cloud.bigquery.migration.v2.IHiveQLDialect|null} [hiveqlDialect] Dialect hiveqlDialect + * @property {google.cloud.bigquery.migration.v2.IRedshiftDialect|null} [redshiftDialect] Dialect redshiftDialect + * @property {google.cloud.bigquery.migration.v2.ITeradataDialect|null} [teradataDialect] Dialect teradataDialect + * @property {google.cloud.bigquery.migration.v2.IOracleDialect|null} [oracleDialect] Dialect oracleDialect + * @property {google.cloud.bigquery.migration.v2.ISparkSQLDialect|null} [sparksqlDialect] Dialect sparksqlDialect + * @property {google.cloud.bigquery.migration.v2.ISnowflakeDialect|null} [snowflakeDialect] Dialect snowflakeDialect + * @property {google.cloud.bigquery.migration.v2.INetezzaDialect|null} [netezzaDialect] Dialect netezzaDialect + * @property {google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null} [azureSynapseDialect] Dialect azureSynapseDialect + * @property {google.cloud.bigquery.migration.v2.IVerticaDialect|null} [verticaDialect] Dialect verticaDialect + * @property {google.cloud.bigquery.migration.v2.ISQLServerDialect|null} [sqlServerDialect] Dialect sqlServerDialect + * @property {google.cloud.bigquery.migration.v2.IPostgresqlDialect|null} [postgresqlDialect] Dialect postgresqlDialect + * @property {google.cloud.bigquery.migration.v2.IPrestoDialect|null} [prestoDialect] Dialect prestoDialect + * @property {google.cloud.bigquery.migration.v2.IMySQLDialect|null} [mysqlDialect] Dialect mysqlDialect + * @property {google.cloud.bigquery.migration.v2.IDB2Dialect|null} [db2Dialect] Dialect db2Dialect + * @property {google.cloud.bigquery.migration.v2.ISQLiteDialect|null} [sqliteDialect] Dialect sqliteDialect + * @property {google.cloud.bigquery.migration.v2.IGreenplumDialect|null} [greenplumDialect] Dialect greenplumDialect + */ + + /** + * Constructs a new Dialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a Dialect. + * @implements IDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IDialect=} [properties] Properties to set + */ + function Dialect(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]]; + } + + /** + * Dialect bigqueryDialect. + * @member {google.cloud.bigquery.migration.v2.IBigQueryDialect|null|undefined} bigqueryDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.bigqueryDialect = null; + + /** + * Dialect hiveqlDialect. + * @member {google.cloud.bigquery.migration.v2.IHiveQLDialect|null|undefined} hiveqlDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.hiveqlDialect = null; + + /** + * Dialect redshiftDialect. + * @member {google.cloud.bigquery.migration.v2.IRedshiftDialect|null|undefined} redshiftDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.redshiftDialect = null; + + /** + * Dialect teradataDialect. + * @member {google.cloud.bigquery.migration.v2.ITeradataDialect|null|undefined} teradataDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.teradataDialect = null; + + /** + * Dialect oracleDialect. + * @member {google.cloud.bigquery.migration.v2.IOracleDialect|null|undefined} oracleDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.oracleDialect = null; + + /** + * Dialect sparksqlDialect. + * @member {google.cloud.bigquery.migration.v2.ISparkSQLDialect|null|undefined} sparksqlDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.sparksqlDialect = null; + + /** + * Dialect snowflakeDialect. + * @member {google.cloud.bigquery.migration.v2.ISnowflakeDialect|null|undefined} snowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.snowflakeDialect = null; + + /** + * Dialect netezzaDialect. + * @member {google.cloud.bigquery.migration.v2.INetezzaDialect|null|undefined} netezzaDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.netezzaDialect = null; + + /** + * Dialect azureSynapseDialect. + * @member {google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null|undefined} azureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.azureSynapseDialect = null; + + /** + * Dialect verticaDialect. + * @member {google.cloud.bigquery.migration.v2.IVerticaDialect|null|undefined} verticaDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.verticaDialect = null; + + /** + * Dialect sqlServerDialect. + * @member {google.cloud.bigquery.migration.v2.ISQLServerDialect|null|undefined} sqlServerDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.sqlServerDialect = null; + + /** + * Dialect postgresqlDialect. + * @member {google.cloud.bigquery.migration.v2.IPostgresqlDialect|null|undefined} postgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.postgresqlDialect = null; + + /** + * Dialect prestoDialect. + * @member {google.cloud.bigquery.migration.v2.IPrestoDialect|null|undefined} prestoDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.prestoDialect = null; + + /** + * Dialect mysqlDialect. + * @member {google.cloud.bigquery.migration.v2.IMySQLDialect|null|undefined} mysqlDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.mysqlDialect = null; + + /** + * Dialect db2Dialect. + * @member {google.cloud.bigquery.migration.v2.IDB2Dialect|null|undefined} db2Dialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.db2Dialect = null; + + /** + * Dialect sqliteDialect. + * @member {google.cloud.bigquery.migration.v2.ISQLiteDialect|null|undefined} sqliteDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.sqliteDialect = null; + + /** + * Dialect greenplumDialect. + * @member {google.cloud.bigquery.migration.v2.IGreenplumDialect|null|undefined} greenplumDialect + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Dialect.prototype.greenplumDialect = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dialect dialectValue. + * @member {"bigqueryDialect"|"hiveqlDialect"|"redshiftDialect"|"teradataDialect"|"oracleDialect"|"sparksqlDialect"|"snowflakeDialect"|"netezzaDialect"|"azureSynapseDialect"|"verticaDialect"|"sqlServerDialect"|"postgresqlDialect"|"prestoDialect"|"mysqlDialect"|"db2Dialect"|"sqliteDialect"|"greenplumDialect"|undefined} dialectValue + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + */ + Object.defineProperty(Dialect.prototype, "dialectValue", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryDialect", "hiveqlDialect", "redshiftDialect", "teradataDialect", "oracleDialect", "sparksqlDialect", "snowflakeDialect", "netezzaDialect", "azureSynapseDialect", "verticaDialect", "sqlServerDialect", "postgresqlDialect", "prestoDialect", "mysqlDialect", "db2Dialect", "sqliteDialect", "greenplumDialect"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.IDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect instance + */ + Dialect.create = function create(properties) { + return new Dialect(properties); + }; + + /** + * Encodes the specified Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.IDialect} message Dialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryDialect != null && Object.hasOwnProperty.call(message, "bigqueryDialect")) + $root.google.cloud.bigquery.migration.v2.BigQueryDialect.encode(message.bigqueryDialect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.hiveqlDialect != null && Object.hasOwnProperty.call(message, "hiveqlDialect")) + $root.google.cloud.bigquery.migration.v2.HiveQLDialect.encode(message.hiveqlDialect, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.redshiftDialect != null && Object.hasOwnProperty.call(message, "redshiftDialect")) + $root.google.cloud.bigquery.migration.v2.RedshiftDialect.encode(message.redshiftDialect, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.teradataDialect != null && Object.hasOwnProperty.call(message, "teradataDialect")) + $root.google.cloud.bigquery.migration.v2.TeradataDialect.encode(message.teradataDialect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.oracleDialect != null && Object.hasOwnProperty.call(message, "oracleDialect")) + $root.google.cloud.bigquery.migration.v2.OracleDialect.encode(message.oracleDialect, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sparksqlDialect != null && Object.hasOwnProperty.call(message, "sparksqlDialect")) + $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.encode(message.sparksqlDialect, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.snowflakeDialect != null && Object.hasOwnProperty.call(message, "snowflakeDialect")) + $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.encode(message.snowflakeDialect, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.netezzaDialect != null && Object.hasOwnProperty.call(message, "netezzaDialect")) + $root.google.cloud.bigquery.migration.v2.NetezzaDialect.encode(message.netezzaDialect, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.azureSynapseDialect != null && Object.hasOwnProperty.call(message, "azureSynapseDialect")) + $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.encode(message.azureSynapseDialect, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.verticaDialect != null && Object.hasOwnProperty.call(message, "verticaDialect")) + $root.google.cloud.bigquery.migration.v2.VerticaDialect.encode(message.verticaDialect, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sqlServerDialect != null && Object.hasOwnProperty.call(message, "sqlServerDialect")) + $root.google.cloud.bigquery.migration.v2.SQLServerDialect.encode(message.sqlServerDialect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.postgresqlDialect != null && Object.hasOwnProperty.call(message, "postgresqlDialect")) + $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.encode(message.postgresqlDialect, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.prestoDialect != null && Object.hasOwnProperty.call(message, "prestoDialect")) + $root.google.cloud.bigquery.migration.v2.PrestoDialect.encode(message.prestoDialect, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.mysqlDialect != null && Object.hasOwnProperty.call(message, "mysqlDialect")) + $root.google.cloud.bigquery.migration.v2.MySQLDialect.encode(message.mysqlDialect, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.db2Dialect != null && Object.hasOwnProperty.call(message, "db2Dialect")) + $root.google.cloud.bigquery.migration.v2.DB2Dialect.encode(message.db2Dialect, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sqliteDialect != null && Object.hasOwnProperty.call(message, "sqliteDialect")) + $root.google.cloud.bigquery.migration.v2.SQLiteDialect.encode(message.sqliteDialect, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.greenplumDialect != null && Object.hasOwnProperty.call(message, "greenplumDialect")) + $root.google.cloud.bigquery.migration.v2.GreenplumDialect.encode(message.greenplumDialect, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.IDialect} message Dialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @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.Dialect} Dialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dialect.decode = function decode(reader, length) { + 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.Dialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.decode(reader, reader.uint32()); + break; + } + case 2: { + message.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.decode(reader, reader.uint32()); + break; + } + case 3: { + message.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.decode(reader, reader.uint32()); + break; + } + case 4: { + message.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.decode(reader, reader.uint32()); + break; + } + case 5: { + message.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.decode(reader, reader.uint32()); + break; + } + case 6: { + message.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.decode(reader, reader.uint32()); + break; + } + case 7: { + message.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.decode(reader, reader.uint32()); + break; + } + case 8: { + message.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.decode(reader, reader.uint32()); + break; + } + case 9: { + message.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.decode(reader, reader.uint32()); + break; + } + case 10: { + message.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.decode(reader, reader.uint32()); + break; + } + case 12: { + message.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.decode(reader, reader.uint32()); + break; + } + case 13: { + message.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.decode(reader, reader.uint32()); + break; + } + case 14: { + message.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.decode(reader, reader.uint32()); + break; + } + case 15: { + message.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.decode(reader, reader.uint32()); + break; + } + case 16: { + message.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.decode(reader, reader.uint32()); + break; + } + case 17: { + message.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.verify(message.bigqueryDialect); + if (error) + return "bigqueryDialect." + error; + } + } + if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.verify(message.hiveqlDialect); + if (error) + return "hiveqlDialect." + error; + } + } + if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.verify(message.redshiftDialect); + if (error) + return "redshiftDialect." + error; + } + } + if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TeradataDialect.verify(message.teradataDialect); + if (error) + return "teradataDialect." + error; + } + } + if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.OracleDialect.verify(message.oracleDialect); + if (error) + return "oracleDialect." + error; + } + } + if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.verify(message.sparksqlDialect); + if (error) + return "sparksqlDialect." + error; + } + } + if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.verify(message.snowflakeDialect); + if (error) + return "snowflakeDialect." + error; + } + } + if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.verify(message.netezzaDialect); + if (error) + return "netezzaDialect." + error; + } + } + if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify(message.azureSynapseDialect); + if (error) + return "azureSynapseDialect." + error; + } + } + if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.VerticaDialect.verify(message.verticaDialect); + if (error) + return "verticaDialect." + error; + } + } + if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { if (properties.dialectValue === 1) return "dialectValue: multiple values"; properties.dialectValue = 1; @@ -4286,256 +5089,2134 @@ return "sqlServerDialect." + error; } } - if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.verify(message.postgresqlDialect); - if (error) - return "postgresqlDialect." + error; + if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.verify(message.postgresqlDialect); + if (error) + return "postgresqlDialect." + error; + } + } + if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.PrestoDialect.verify(message.prestoDialect); + if (error) + return "prestoDialect." + error; + } + } + if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.MySQLDialect.verify(message.mysqlDialect); + if (error) + return "mysqlDialect." + error; + } + } + if (message.db2Dialect != null && message.hasOwnProperty("db2Dialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.DB2Dialect.verify(message.db2Dialect); + if (error) + return "db2Dialect." + error; + } + } + if (message.sqliteDialect != null && message.hasOwnProperty("sqliteDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.verify(message.sqliteDialect); + if (error) + return "sqliteDialect." + error; + } + } + if (message.greenplumDialect != null && message.hasOwnProperty("greenplumDialect")) { + if (properties.dialectValue === 1) + return "dialectValue: multiple values"; + properties.dialectValue = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.verify(message.greenplumDialect); + if (error) + return "greenplumDialect." + error; + } + } + return null; + }; + + /** + * Creates a Dialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect + */ + Dialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.Dialect) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.Dialect(); + if (object.bigqueryDialect != null) { + if (typeof object.bigqueryDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.bigqueryDialect: object expected"); + message.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.fromObject(object.bigqueryDialect); + } + if (object.hiveqlDialect != null) { + if (typeof object.hiveqlDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.hiveqlDialect: object expected"); + message.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.fromObject(object.hiveqlDialect); + } + if (object.redshiftDialect != null) { + if (typeof object.redshiftDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.redshiftDialect: object expected"); + message.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.fromObject(object.redshiftDialect); + } + if (object.teradataDialect != null) { + if (typeof object.teradataDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.teradataDialect: object expected"); + message.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.fromObject(object.teradataDialect); + } + if (object.oracleDialect != null) { + if (typeof object.oracleDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.oracleDialect: object expected"); + message.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.fromObject(object.oracleDialect); + } + if (object.sparksqlDialect != null) { + if (typeof object.sparksqlDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.sparksqlDialect: object expected"); + message.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.fromObject(object.sparksqlDialect); + } + if (object.snowflakeDialect != null) { + if (typeof object.snowflakeDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.snowflakeDialect: object expected"); + message.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.fromObject(object.snowflakeDialect); + } + if (object.netezzaDialect != null) { + if (typeof object.netezzaDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.netezzaDialect: object expected"); + message.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.fromObject(object.netezzaDialect); + } + if (object.azureSynapseDialect != null) { + if (typeof object.azureSynapseDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.azureSynapseDialect: object expected"); + message.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.fromObject(object.azureSynapseDialect); + } + if (object.verticaDialect != null) { + if (typeof object.verticaDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.verticaDialect: object expected"); + message.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.fromObject(object.verticaDialect); + } + if (object.sqlServerDialect != null) { + if (typeof object.sqlServerDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.sqlServerDialect: object expected"); + message.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.fromObject(object.sqlServerDialect); + } + if (object.postgresqlDialect != null) { + if (typeof object.postgresqlDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.postgresqlDialect: object expected"); + message.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.fromObject(object.postgresqlDialect); + } + if (object.prestoDialect != null) { + if (typeof object.prestoDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.prestoDialect: object expected"); + message.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.fromObject(object.prestoDialect); + } + if (object.mysqlDialect != null) { + if (typeof object.mysqlDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.mysqlDialect: object expected"); + message.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.fromObject(object.mysqlDialect); + } + if (object.db2Dialect != null) { + if (typeof object.db2Dialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.db2Dialect: object expected"); + message.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.fromObject(object.db2Dialect); + } + if (object.sqliteDialect != null) { + if (typeof object.sqliteDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.sqliteDialect: object expected"); + message.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.fromObject(object.sqliteDialect); + } + if (object.greenplumDialect != null) { + if (typeof object.greenplumDialect !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.greenplumDialect: object expected"); + message.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.fromObject(object.greenplumDialect); + } + return message; + }; + + /** + * 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) { + 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(); + 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) { + 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(); + 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.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HiveQLDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HiveQLDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @instance + * @returns {Object.} JSON object + */ + HiveQLDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HiveQLDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.HiveQLDialect"; + }; + + return HiveQLDialect; + })(); + + v2.RedshiftDialect = (function() { + + /** + * Properties of a RedshiftDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IRedshiftDialect + */ + + /** + * Constructs a new RedshiftDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a RedshiftDialect. + * @implements IRedshiftDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + */ + function RedshiftDialect(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 RedshiftDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect instance + */ + RedshiftDialect.create = function create(properties) { + return new RedshiftDialect(properties); + }; + + /** + * 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.RedshiftDialect + * @static + * @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 + */ + RedshiftDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @static + * @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 + */ + RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedshiftDialect message from the specified reader or buffer. + * @function decode + * @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.RedshiftDialect} RedshiftDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.RedshiftDialect} RedshiftDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedshiftDialect message. + * @function verify + * @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 + */ + RedshiftDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @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) + return object; + return new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + }; + + /** + * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @static + * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedshiftDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RedshiftDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @instance + * @returns {Object.} JSON object + */ + RedshiftDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedshiftDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.RedshiftDialect"; + }; + + return RedshiftDialect; + })(); + + v2.TeradataDialect = (function() { + + /** + * Properties of a TeradataDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITeradataDialect + * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode + */ + + /** + * Constructs a new TeradataDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TeradataDialect. + * @implements ITeradataDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + */ + function TeradataDialect(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]]; + } + + /** + * 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.TeradataDialect + * @static + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect instance + */ + TeradataDialect.create = function create(properties) { + return new TeradataDialect(properties); + }; + + /** + * 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.TeradataDialect + * @static + * @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 + */ + 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 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.TeradataDialect + * @static + * @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 + */ + TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TeradataDialect message from the specified reader or buffer. + * @function decode + * @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.TeradataDialect} TeradataDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TeradataDialect} TeradataDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TeradataDialect message. + * @function verify + * @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 + */ + 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 TeradataDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + */ + TeradataDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) + 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; + }; + + /** + * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @static + * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect + * @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; + }; + + /** + * Converts this TeradataDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @instance + * @returns {Object.} JSON object + */ + TeradataDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TeradataDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TeradataDialect"; + }; + + /** + * 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.OracleDialect = (function() { + + /** + * Properties of an OracleDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IOracleDialect + */ + + /** + * Constructs a new OracleDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an OracleDialect. + * @implements IOracleDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + */ + function OracleDialect(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 OracleDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect instance + */ + OracleDialect.create = function create(properties) { + return new OracleDialect(properties); + }; + + /** + * 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.OracleDialect + * @static + * @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 + */ + OracleDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @static + * @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 + */ + OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleDialect message from the specified reader or buffer. + * @function decode + * @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.OracleDialect} OracleDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OracleDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.OracleDialect} OracleDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OracleDialect message. + * @function verify + * @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 + */ + OracleDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @static + * @param {Object.} object Plain object + * @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.OracleDialect(); + }; + + /** + * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @static + * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OracleDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OracleDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @instance + * @returns {Object.} JSON object + */ + OracleDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OracleDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.OracleDialect"; + }; + + return OracleDialect; + })(); + + v2.SparkSQLDialect = (function() { + + /** + * Properties of a SparkSQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISparkSQLDialect + */ + + /** + * Constructs a new SparkSQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SparkSQLDialect. + * @implements ISparkSQLDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + */ + function SparkSQLDialect(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 SparkSQLDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect instance + */ + SparkSQLDialect.create = function create(properties) { + return new SparkSQLDialect(properties); + }; + + /** + * 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.SparkSQLDialect + * @static + * @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 + */ + SparkSQLDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @static + * @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 + */ + SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkSQLDialect message from the specified reader or buffer. + * @function decode + * @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.SparkSQLDialect} SparkSQLDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SparkSQLDialect} SparkSQLDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkSQLDialect message. + * @function verify + * @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 + */ + SparkSQLDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + */ + SparkSQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + }; + + /** + * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkSQLDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SparkSQLDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @instance + * @returns {Object.} JSON object + */ + SparkSQLDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SparkSQLDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SparkSQLDialect"; + }; + + return SparkSQLDialect; + })(); + + v2.SnowflakeDialect = (function() { + + /** + * Properties of a SnowflakeDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISnowflakeDialect + */ + + /** + * Constructs a new SnowflakeDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SnowflakeDialect. + * @implements ISnowflakeDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + */ + function SnowflakeDialect(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 SnowflakeDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @static + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect instance + */ + SnowflakeDialect.create = function create(properties) { + return new SnowflakeDialect(properties); + }; + + /** + * 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.SnowflakeDialect + * @static + * @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 + */ + SnowflakeDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @static + * @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 + */ + SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnowflakeDialect message from the specified reader or buffer. + * @function decode + * @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.SnowflakeDialect} SnowflakeDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SnowflakeDialect} SnowflakeDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnowflakeDialect message. + * @function verify + * @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 + */ + SnowflakeDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + */ + 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.SnowflakeDialect(); + }; + + /** + * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @static + * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnowflakeDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SnowflakeDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @instance + * @returns {Object.} JSON object + */ + SnowflakeDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnowflakeDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SnowflakeDialect"; + }; + + return SnowflakeDialect; + })(); + + v2.NetezzaDialect = (function() { + + /** + * Properties of a NetezzaDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface INetezzaDialect + */ + + /** + * Constructs a new NetezzaDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a NetezzaDialect. + * @implements INetezzaDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + */ + function NetezzaDialect(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 NetezzaDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @static + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect instance + */ + NetezzaDialect.create = function create(properties) { + return new NetezzaDialect(properties); + }; + + /** + * 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.NetezzaDialect + * @static + * @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 + */ + NetezzaDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @static + * @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 + */ + NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetezzaDialect message from the specified reader or buffer. + * @function decode + * @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.NetezzaDialect} NetezzaDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.NetezzaDialect} NetezzaDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetezzaDialect message. + * @function verify + * @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 + */ + NetezzaDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + */ + 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.NetezzaDialect(); + }; + + /** + * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @static + * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetezzaDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this NetezzaDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @instance + * @returns {Object.} JSON object + */ + NetezzaDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetezzaDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NetezzaDialect"; + }; + + return NetezzaDialect; + })(); + + v2.AzureSynapseDialect = (function() { + + /** + * Properties of an AzureSynapseDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IAzureSynapseDialect + */ + + /** + * Constructs a new AzureSynapseDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an AzureSynapseDialect. + * @implements IAzureSynapseDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + */ + function AzureSynapseDialect(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 AzureSynapseDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect instance + */ + AzureSynapseDialect.create = function create(properties) { + return new AzureSynapseDialect(properties); + }; + + /** + * 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.AzureSynapseDialect + * @static + * @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 + */ + AzureSynapseDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @static + * @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 + */ + AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureSynapseDialect message from the specified reader or buffer. + * @function decode + * @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.AzureSynapseDialect} AzureSynapseDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } } - if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.PrestoDialect.verify(message.prestoDialect); - if (error) - return "prestoDialect." + error; - } + return message; + }; + + /** + * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.AzureSynapseDialect} AzureSynapseDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureSynapseDialect message. + * @function verify + * @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 + */ + AzureSynapseDialect.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. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + */ + 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.AzureSynapseDialect(); + }; + + /** + * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @static + * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureSynapseDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AzureSynapseDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @instance + * @returns {Object.} JSON object + */ + AzureSynapseDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureSynapseDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { - if (properties.dialectValue === 1) - return "dialectValue: multiple values"; - properties.dialectValue = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.MySQLDialect.verify(message.mysqlDialect); - if (error) - return "mysqlDialect." + error; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AzureSynapseDialect"; + }; + + return AzureSynapseDialect; + })(); + + v2.VerticaDialect = (function() { + + /** + * Properties of a VerticaDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IVerticaDialect + */ + + /** + * Constructs a new VerticaDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a VerticaDialect. + * @implements IVerticaDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + */ + function VerticaDialect(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 VerticaDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect instance + */ + VerticaDialect.create = function create(properties) { + return new VerticaDialect(properties); + }; + + /** + * 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.VerticaDialect + * @static + * @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 + */ + VerticaDialect.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. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @static + * @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 + */ + VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerticaDialect message from the specified reader or buffer. + * @function decode + * @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.VerticaDialect} VerticaDialect + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } } + return message; + }; + + /** + * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.VerticaDialect} VerticaDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerticaDialect message. + * @function verify + * @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 + */ + VerticaDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates a Dialect 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.Dialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.Dialect} Dialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect */ - Dialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.Dialect) + VerticaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) return object; - var message = new $root.google.cloud.bigquery.migration.v2.Dialect(); - if (object.bigqueryDialect != null) { - if (typeof object.bigqueryDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.bigqueryDialect: object expected"); - message.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.fromObject(object.bigqueryDialect); - } - if (object.hiveqlDialect != null) { - if (typeof object.hiveqlDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.hiveqlDialect: object expected"); - message.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.fromObject(object.hiveqlDialect); - } - if (object.redshiftDialect != null) { - if (typeof object.redshiftDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.redshiftDialect: object expected"); - message.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.fromObject(object.redshiftDialect); - } - if (object.teradataDialect != null) { - if (typeof object.teradataDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.teradataDialect: object expected"); - message.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.fromObject(object.teradataDialect); - } - if (object.oracleDialect != null) { - if (typeof object.oracleDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.oracleDialect: object expected"); - message.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.fromObject(object.oracleDialect); - } - if (object.sparksqlDialect != null) { - if (typeof object.sparksqlDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.sparksqlDialect: object expected"); - message.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.fromObject(object.sparksqlDialect); - } - if (object.snowflakeDialect != null) { - if (typeof object.snowflakeDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.snowflakeDialect: object expected"); - message.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.fromObject(object.snowflakeDialect); - } - if (object.netezzaDialect != null) { - if (typeof object.netezzaDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.netezzaDialect: object expected"); - message.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.fromObject(object.netezzaDialect); - } - if (object.azureSynapseDialect != null) { - if (typeof object.azureSynapseDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.azureSynapseDialect: object expected"); - message.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.fromObject(object.azureSynapseDialect); - } - if (object.verticaDialect != null) { - if (typeof object.verticaDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.verticaDialect: object expected"); - message.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.fromObject(object.verticaDialect); - } - if (object.sqlServerDialect != null) { - if (typeof object.sqlServerDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.sqlServerDialect: object expected"); - message.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.fromObject(object.sqlServerDialect); - } - if (object.postgresqlDialect != null) { - if (typeof object.postgresqlDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.postgresqlDialect: object expected"); - message.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.fromObject(object.postgresqlDialect); - } - if (object.prestoDialect != null) { - if (typeof object.prestoDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.prestoDialect: object expected"); - message.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.fromObject(object.prestoDialect); - } - if (object.mysqlDialect != null) { - if (typeof object.mysqlDialect !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.Dialect.mysqlDialect: object expected"); - message.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.fromObject(object.mysqlDialect); - } - return message; + return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); }; /** - * Creates a plain object from a Dialect 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.Dialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.Dialect} message Dialect + * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect * @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"; - } - return object; + VerticaDialect.toObject = function toObject() { + return {}; }; /** - * Converts this Dialect to JSON. + * Converts this VerticaDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @instance * @returns {Object.} JSON object */ - Dialect.prototype.toJSON = function toJSON() { + VerticaDialect.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 VerticaDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerticaDialect.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.VerticaDialect"; }; - return Dialect; + return VerticaDialect; })(); - v2.BigQueryDialect = (function() { + v2.SQLServerDialect = (function() { /** - * Properties of a BigQueryDialect. + * Properties of a SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IBigQueryDialect + * @interface ISQLServerDialect */ /** - * Constructs a new BigQueryDialect. + * Constructs a new SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a BigQueryDialect. - * @implements IBigQueryDialect + * @classdesc Represents a SQLServerDialect. + * @implements ISQLServerDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set */ - function BigQueryDialect(properties) { + function SQLServerDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4543,60 +7224,60 @@ } /** - * Creates a new BigQueryDialect instance using the specified properties. + * Creates a new SQLServerDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @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.ISQLServerDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance */ - BigQueryDialect.create = function create(properties) { - return new BigQueryDialect(properties); + SQLServerDialect.create = function create(properties) { + return new SQLServerDialect(properties); }; /** - * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.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.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect 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 */ - BigQueryDialect.encode = function encode(message, writer) { + SQLServerDialect.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 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.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect 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 */ - BigQueryDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDialect 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.BigQueryDialect + * @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.BigQueryDialect} BigQueryDialect + * @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 */ - BigQueryDialect.decode = function decode(reader, length) { + SQLServerDialect.decode = function decode(reader, length) { 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.SQLServerDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4609,108 +7290,108 @@ }; /** - * Decodes a BigQueryDialect 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.BigQueryDialect + * @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.BigQueryDialect} BigQueryDialect + * @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 */ - BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDialect message. + * Verifies a SQLServerDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @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 */ - BigQueryDialect.verify = function verify(message) { + SQLServerDialect.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 SQLServerDialect 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.SQLServerDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect */ - BigQueryDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + 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.BigQueryDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); }; /** - * Creates a plain object from a BigQueryDialect 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.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDialect.toObject = function toObject() { + SQLServerDialect.toObject = function toObject() { return {}; }; /** - * Converts this BigQueryDialect to JSON. + * Converts this SQLServerDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @instance * @returns {Object.} JSON object */ - BigQueryDialect.prototype.toJSON = function toJSON() { + SQLServerDialect.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 SQLServerDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLServerDialect.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.SQLServerDialect"; }; - return BigQueryDialect; + return SQLServerDialect; })(); - v2.HiveQLDialect = (function() { + v2.PostgresqlDialect = (function() { /** - * Properties of a HiveQLDialect. + * Properties of a PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IHiveQLDialect + * @interface IPostgresqlDialect */ /** - * Constructs a new HiveQLDialect. + * Constructs a new PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a HiveQLDialect. - * @implements IHiveQLDialect + * @classdesc Represents a PostgresqlDialect. + * @implements IPostgresqlDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set */ - function HiveQLDialect(properties) { + function PostgresqlDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4718,60 +7399,60 @@ } /** - * Creates a new HiveQLDialect instance using the specified properties. + * Creates a new PostgresqlDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @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.IPostgresqlDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance */ - HiveQLDialect.create = function create(properties) { - return new HiveQLDialect(properties); + PostgresqlDialect.create = function create(properties) { + return new PostgresqlDialect(properties); }; /** - * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.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.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect 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 */ - HiveQLDialect.encode = function encode(message, writer) { + PostgresqlDialect.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. + * 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.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect 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 */ - HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveQLDialect 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.HiveQLDialect + * @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.HiveQLDialect} HiveQLDialect + * @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 */ - HiveQLDialect.decode = function decode(reader, length) { + PostgresqlDialect.decode = function decode(reader, length) { 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.PostgresqlDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4784,108 +7465,108 @@ }; /** - * Decodes a HiveQLDialect 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.HiveQLDialect + * @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.HiveQLDialect} HiveQLDialect + * @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 */ - HiveQLDialect.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 HiveQLDialect message. + * Verifies a PostgresqlDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @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 */ - HiveQLDialect.verify = function verify(message) { + PostgresqlDialect.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. + * Creates a PostgresqlDialect 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.PostgresqlDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect */ - HiveQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + 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.HiveQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); }; /** - * Creates a plain object from a HiveQLDialect 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.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect + * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveQLDialect.toObject = function toObject() { + PostgresqlDialect.toObject = function toObject() { return {}; }; /** - * Converts this HiveQLDialect to JSON. + * Converts this PostgresqlDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @instance * @returns {Object.} JSON object */ - HiveQLDialect.prototype.toJSON = function toJSON() { + PostgresqlDialect.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 PostgresqlDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlDialect.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.PostgresqlDialect"; }; - return HiveQLDialect; + return PostgresqlDialect; })(); - v2.RedshiftDialect = (function() { + v2.PrestoDialect = (function() { /** - * Properties of a RedshiftDialect. + * Properties of a PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IRedshiftDialect + * @interface IPrestoDialect */ /** - * Constructs a new RedshiftDialect. + * Constructs a new PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a RedshiftDialect. - * @implements IRedshiftDialect + * @classdesc Represents a PrestoDialect. + * @implements IPrestoDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set */ - function RedshiftDialect(properties) { + function PrestoDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4893,60 +7574,60 @@ } /** - * Creates a new RedshiftDialect instance using the specified properties. + * Creates a new PrestoDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @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.IPrestoDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance */ - RedshiftDialect.create = function create(properties) { - return new RedshiftDialect(properties); + PrestoDialect.create = function create(properties) { + return new PrestoDialect(properties); }; /** - * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.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.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect 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 */ - RedshiftDialect.encode = function encode(message, writer) { + PrestoDialect.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 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.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect 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 */ - RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { + PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RedshiftDialect 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.RedshiftDialect + * @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.RedshiftDialect} RedshiftDialect + * @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 */ - RedshiftDialect.decode = function decode(reader, length) { + PrestoDialect.decode = function decode(reader, length) { 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.PrestoDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4959,109 +7640,108 @@ }; /** - * Decodes a RedshiftDialect 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.RedshiftDialect + * @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.RedshiftDialect} RedshiftDialect + * @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 */ - RedshiftDialect.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 RedshiftDialect message. + * Verifies a PrestoDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @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 */ - RedshiftDialect.verify = function verify(message) { + PrestoDialect.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 a PrestoDialect 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.PrestoDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect */ - RedshiftDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.RedshiftDialect) + 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.RedshiftDialect(); + return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); }; /** - * Creates a plain object from a RedshiftDialect 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.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect + * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RedshiftDialect.toObject = function toObject() { + PrestoDialect.toObject = function toObject() { return {}; }; /** - * Converts this RedshiftDialect to JSON. + * Converts this PrestoDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @instance * @returns {Object.} JSON object */ - RedshiftDialect.prototype.toJSON = function toJSON() { + PrestoDialect.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 PrestoDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrestoDialect.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.PrestoDialect"; }; - return RedshiftDialect; + return PrestoDialect; })(); - v2.TeradataDialect = (function() { + v2.MySQLDialect = (function() { /** - * Properties of a TeradataDialect. + * Properties of a MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITeradataDialect - * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode + * @interface IMySQLDialect */ /** - * Constructs a new TeradataDialect. + * Constructs a new MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TeradataDialect. - * @implements ITeradataDialect + * @classdesc Represents a MySQLDialect. + * @implements IMySQLDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set */ - function TeradataDialect(properties) { + function MySQLDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5069,77 +7749,63 @@ } /** - * 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 MySQLDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @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.IMySQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance */ - TeradataDialect.create = function create(properties) { - return new TeradataDialect(properties); + MySQLDialect.create = function create(properties) { + return new MySQLDialect(properties); }; /** - * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.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.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect 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 */ - TeradataDialect.encode = function encode(message, writer) { + MySQLDialect.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 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.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect 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 */ - TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { + MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TeradataDialect 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.TeradataDialect + * @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.TeradataDialect} TeradataDialect + * @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 */ - TeradataDialect.decode = function decode(reader, length) { + MySQLDialect.decode = function decode(reader, length) { 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.MySQLDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -5149,161 +7815,108 @@ }; /** - * Decodes a TeradataDialect 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.TeradataDialect + * @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.TeradataDialect} TeradataDialect + * @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 */ - TeradataDialect.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 TeradataDialect message. + * Verifies a MySQLDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @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 */ - TeradataDialect.verify = function verify(message) { + MySQLDialect.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 MySQLDialect 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.MySQLDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect */ - TeradataDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) + MySQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) 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.MySQLDialect(); }; /** - * Creates a plain object from a TeradataDialect 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.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect + * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect * @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; + MySQLDialect.toObject = function toObject() { + return {}; }; /** - * Converts this TeradataDialect to JSON. + * Converts this MySQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @instance * @returns {Object.} JSON object */ - TeradataDialect.prototype.toJSON = function toJSON() { + MySQLDialect.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 MySQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MySQLDialect.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.MySQLDialect"; }; - /** - * 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 MySQLDialect; })(); - v2.OracleDialect = (function() { + v2.DB2Dialect = (function() { /** - * Properties of an OracleDialect. + * Properties of a DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IOracleDialect + * @interface IDB2Dialect */ /** - * Constructs a new OracleDialect. + * Constructs a new DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an OracleDialect. - * @implements IOracleDialect + * @classdesc Represents a DB2Dialect. + * @implements IDB2Dialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set */ - function OracleDialect(properties) { + function DB2Dialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5311,60 +7924,60 @@ } /** - * Creates a new OracleDialect instance using the specified properties. + * Creates a new DB2Dialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @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.IDB2Dialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance */ - OracleDialect.create = function create(properties) { - return new OracleDialect(properties); + DB2Dialect.create = function create(properties) { + return new DB2Dialect(properties); }; /** - * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.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.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect 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 */ - OracleDialect.encode = function encode(message, writer) { + DB2Dialect.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 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.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect 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 */ - OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { + DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleDialect 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.OracleDialect + * @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.OracleDialect} OracleDialect + * @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 */ - OracleDialect.decode = function decode(reader, length) { + DB2Dialect.decode = function decode(reader, length) { 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.DB2Dialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5377,108 +7990,108 @@ }; /** - * Decodes an OracleDialect 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.OracleDialect + * @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.OracleDialect} OracleDialect + * @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 */ - OracleDialect.decodeDelimited = function decodeDelimited(reader) { + DB2Dialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleDialect message. + * Verifies a DB2Dialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @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 */ - OracleDialect.verify = function verify(message) { + DB2Dialect.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 DB2Dialect 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.DB2Dialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect */ - OracleDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.OracleDialect) + 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.OracleDialect(); + return new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); }; /** - * Creates a plain object from an OracleDialect 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.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect + * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleDialect.toObject = function toObject() { + DB2Dialect.toObject = function toObject() { return {}; }; /** - * Converts this OracleDialect to JSON. + * Converts this DB2Dialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @instance * @returns {Object.} JSON object */ - OracleDialect.prototype.toJSON = function toJSON() { + DB2Dialect.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 DB2Dialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DB2Dialect.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.DB2Dialect"; }; - return OracleDialect; + return DB2Dialect; })(); - v2.SparkSQLDialect = (function() { + v2.SQLiteDialect = (function() { /** - * Properties of a SparkSQLDialect. + * Properties of a SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISparkSQLDialect + * @interface ISQLiteDialect */ /** - * Constructs a new SparkSQLDialect. + * Constructs a new SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SparkSQLDialect. - * @implements ISparkSQLDialect + * @classdesc Represents a SQLiteDialect. + * @implements ISQLiteDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set */ - function SparkSQLDialect(properties) { + function SQLiteDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5486,60 +8099,60 @@ } /** - * Creates a new SparkSQLDialect instance using the specified properties. + * Creates a new SQLiteDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @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.ISQLiteDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance */ - SparkSQLDialect.create = function create(properties) { - return new SparkSQLDialect(properties); + SQLiteDialect.create = function create(properties) { + return new SQLiteDialect(properties); }; /** - * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.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.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect 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 */ - SparkSQLDialect.encode = function encode(message, writer) { + SQLiteDialect.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 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.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect 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 */ - SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SparkSQLDialect 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.SparkSQLDialect + * @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.SparkSQLDialect} SparkSQLDialect + * @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 */ - SparkSQLDialect.decode = function decode(reader, length) { + SQLiteDialect.decode = function decode(reader, length) { 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.SQLiteDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5552,108 +8165,108 @@ }; /** - * Decodes a SparkSQLDialect 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.SparkSQLDialect + * @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.SparkSQLDialect} SparkSQLDialect + * @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 */ - SparkSQLDialect.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 SparkSQLDialect message. + * Verifies a SQLiteDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @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 */ - SparkSQLDialect.verify = function verify(message) { + SQLiteDialect.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 SQLiteDialect 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.SQLiteDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect */ - SparkSQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) + 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.SparkSQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); }; /** - * Creates a plain object from a SparkSQLDialect 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.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect + * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SparkSQLDialect.toObject = function toObject() { + SQLiteDialect.toObject = function toObject() { return {}; }; /** - * Converts this SparkSQLDialect to JSON. + * Converts this SQLiteDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @instance * @returns {Object.} JSON object */ - SparkSQLDialect.prototype.toJSON = function toJSON() { + SQLiteDialect.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 SQLiteDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLiteDialect.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.SQLiteDialect"; }; - return SparkSQLDialect; + return SQLiteDialect; })(); - v2.SnowflakeDialect = (function() { + v2.GreenplumDialect = (function() { /** - * Properties of a SnowflakeDialect. + * Properties of a GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISnowflakeDialect + * @interface IGreenplumDialect */ /** - * Constructs a new SnowflakeDialect. + * Constructs a new GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SnowflakeDialect. - * @implements ISnowflakeDialect + * @classdesc Represents a GreenplumDialect. + * @implements IGreenplumDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set */ - function SnowflakeDialect(properties) { + function GreenplumDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5661,60 +8274,60 @@ } /** - * Creates a new SnowflakeDialect instance using the specified properties. + * Creates a new GreenplumDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @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.IGreenplumDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance */ - SnowflakeDialect.create = function create(properties) { - return new SnowflakeDialect(properties); + GreenplumDialect.create = function create(properties) { + return new GreenplumDialect(properties); }; /** - * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.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.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect 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 */ - SnowflakeDialect.encode = function encode(message, writer) { + GreenplumDialect.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 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.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect 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 */ - SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { + GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SnowflakeDialect 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.SnowflakeDialect + * @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.SnowflakeDialect} SnowflakeDialect + * @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 */ - SnowflakeDialect.decode = function decode(reader, length) { + GreenplumDialect.decode = function decode(reader, length) { 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.GreenplumDialect(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5727,108 +8340,110 @@ }; /** - * Decodes a SnowflakeDialect 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.SnowflakeDialect + * @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.SnowflakeDialect} SnowflakeDialect + * @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 */ - SnowflakeDialect.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 SnowflakeDialect message. + * Verifies a GreenplumDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @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 */ - SnowflakeDialect.verify = function verify(message) { + GreenplumDialect.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 a GreenplumDialect 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.GreenplumDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect */ - SnowflakeDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SnowflakeDialect) + 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.SnowflakeDialect(); + return new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); }; /** - * Creates a plain object from a SnowflakeDialect 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.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect + * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SnowflakeDialect.toObject = function toObject() { + GreenplumDialect.toObject = function toObject() { return {}; }; /** - * Converts this SnowflakeDialect to JSON. + * Converts this GreenplumDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @instance * @returns {Object.} JSON object */ - SnowflakeDialect.prototype.toJSON = function toJSON() { + GreenplumDialect.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 GreenplumDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GreenplumDialect.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.GreenplumDialect"; }; - return SnowflakeDialect; + return GreenplumDialect; })(); - v2.NetezzaDialect = (function() { + v2.ObjectNameMappingList = (function() { /** - * Properties of a NetezzaDialect. + * Properties of an ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @interface INetezzaDialect + * @interface IObjectNameMappingList + * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap */ /** - * Constructs a new NetezzaDialect. + * Constructs a new ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NetezzaDialect. - * @implements INetezzaDialect + * @classdesc Represents an ObjectNameMappingList. + * @implements IObjectNameMappingList * @constructor - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set */ - function NetezzaDialect(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) @@ -5836,63 +8451,80 @@ } /** - * Creates a new NetezzaDialect 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.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @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.IObjectNameMappingList=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance */ - NetezzaDialect.create = function create(properties) { - return new NetezzaDialect(properties); + ObjectNameMappingList.create = function create(properties) { + return new ObjectNameMappingList(properties); }; /** - * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.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.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect 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 */ - NetezzaDialect.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 NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.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.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect 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 */ - NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetezzaDialect 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.NetezzaDialect + * @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.NetezzaDialect} NetezzaDialect + * @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 */ - NetezzaDialect.decode = function decode(reader, length) { + ObjectNameMappingList.decode = function decode(reader, length) { 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.ObjectNameMappingList(); while (reader.pos < end) { var tag = reader.uint32(); 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; @@ -5902,108 +8534,140 @@ }; /** - * Decodes a NetezzaDialect 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.NetezzaDialect + * @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.NetezzaDialect} NetezzaDialect + * @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 */ - NetezzaDialect.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 NetezzaDialect message. + * Verifies an ObjectNameMappingList message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @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 */ - NetezzaDialect.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 NetezzaDialect 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.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList */ - NetezzaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NetezzaDialect) + 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.NetezzaDialect(); + 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 NetezzaDialect 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.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetezzaDialect.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 NetezzaDialect to JSON. + * Converts this ObjectNameMappingList to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @instance * @returns {Object.} JSON object */ - NetezzaDialect.prototype.toJSON = function toJSON() { + ObjectNameMappingList.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 ObjectNameMappingList * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMappingList.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.ObjectNameMappingList"; }; - return NetezzaDialect; + return ObjectNameMappingList; })(); - v2.AzureSynapseDialect = (function() { + v2.ObjectNameMapping = (function() { /** - * Properties of an AzureSynapseDialect. + * Properties of an ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @interface IAzureSynapseDialect + * @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 AzureSynapseDialect. + * Constructs a new ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an AzureSynapseDialect. - * @implements IAzureSynapseDialect + * @classdesc Represents an ObjectNameMapping. + * @implements IObjectNameMapping * @constructor - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set */ - function AzureSynapseDialect(properties) { + function ObjectNameMapping(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6011,63 +8675,91 @@ } /** - * Creates a new AzureSynapseDialect instance using the specified properties. + * 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 + */ + ObjectNameMapping.prototype.target = null; + + /** + * Creates a new ObjectNameMapping instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @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.IObjectNameMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance */ - AzureSynapseDialect.create = function create(properties) { - return new AzureSynapseDialect(properties); + ObjectNameMapping.create = function create(properties) { + return new ObjectNameMapping(properties); }; /** - * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.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.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect 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 */ - AzureSynapseDialect.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 AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.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.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect 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 */ - AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureSynapseDialect 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.AzureSynapseDialect + * @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.AzureSynapseDialect} AzureSynapseDialect + * @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 */ - AzureSynapseDialect.decode = function decode(reader, length) { + ObjectNameMapping.decode = function decode(reader, length) { 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.ObjectNameMapping(); while (reader.pos < end) { var tag = reader.uint32(); 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; @@ -6077,108 +8769,145 @@ }; /** - * Decodes an AzureSynapseDialect 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.AzureSynapseDialect + * @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.AzureSynapseDialect} AzureSynapseDialect + * @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 */ - AzureSynapseDialect.decodeDelimited = function decodeDelimited(reader) { + ObjectNameMapping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureSynapseDialect message. + * Verifies an ObjectNameMapping message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @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 */ - AzureSynapseDialect.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 an AzureSynapseDialect 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.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping */ - AzureSynapseDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect) + 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.AzureSynapseDialect(); + 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 an AzureSynapseDialect 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.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureSynapseDialect.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 AzureSynapseDialect to JSON. + * Converts this ObjectNameMapping to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @instance * @returns {Object.} JSON object */ - AzureSynapseDialect.prototype.toJSON = function toJSON() { + ObjectNameMapping.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 ObjectNameMapping * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMapping.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.ObjectNameMapping"; }; - return AzureSynapseDialect; + return ObjectNameMapping; })(); - v2.VerticaDialect = (function() { + v2.NameMappingKey = (function() { /** - * Properties of a VerticaDialect. + * Properties of a NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @interface IVerticaDialect + * @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 VerticaDialect. + * Constructs a new NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a VerticaDialect. - * @implements IVerticaDialect + * @classdesc Represents a NameMappingKey. + * @implements INameMappingKey * @constructor - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set */ - function VerticaDialect(properties) { + function NameMappingKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6186,63 +8915,133 @@ } /** - * Creates a new VerticaDialect instance using the specified properties. + * 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 + * @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.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @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.INameMappingKey=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance */ - VerticaDialect.create = function create(properties) { - return new VerticaDialect(properties); + NameMappingKey.create = function create(properties) { + return new NameMappingKey(properties); }; /** - * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.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.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect 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 */ - VerticaDialect.encode = function encode(message, writer) { + NameMappingKey.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); 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 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.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect 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 */ - VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerticaDialect 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.VerticaDialect + * @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.VerticaDialect} VerticaDialect + * @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 */ - VerticaDialect.decode = function decode(reader, length) { + NameMappingKey.decode = function decode(reader, length) { 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.NameMappingKey(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + 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: reader.skipType(tag & 7); break; @@ -6252,108 +9051,233 @@ }; /** - * Decodes a VerticaDialect 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.VerticaDialect + * @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.VerticaDialect} VerticaDialect + * @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 */ - VerticaDialect.decodeDelimited = function decodeDelimited(reader) { + NameMappingKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerticaDialect message. + * Verifies a NameMappingKey message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @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 */ - VerticaDialect.verify = function verify(message) { + NameMappingKey.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"; return null; }; /** - * Creates a VerticaDialect 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.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey */ - VerticaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) + NameMappingKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) return object; - return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + 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 a VerticaDialect 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.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect + * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerticaDialect.toObject = function toObject() { - return {}; + NameMappingKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 VerticaDialect to JSON. + * Converts this NameMappingKey to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @instance * @returns {Object.} JSON object */ - VerticaDialect.prototype.toJSON = function toJSON() { + NameMappingKey.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 NameMappingKey * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingKey.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.NameMappingKey"; }; - return VerticaDialect; + /** + * 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.SQLServerDialect = (function() { + v2.NameMappingValue = (function() { /** - * Properties of a SQLServerDialect. + * Properties of a NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLServerDialect + * @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 SQLServerDialect. + * Constructs a new NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLServerDialect. - * @implements ISQLServerDialect + * @classdesc Represents a NameMappingValue. + * @implements INameMappingValue * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set */ - function SQLServerDialect(properties) { + function NameMappingValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6361,63 +9285,119 @@ } /** - * Creates a new SQLServerDialect instance using the specified properties. + * NameMappingValue database. + * @member {string} database + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + */ + NameMappingValue.prototype.database = ""; + + /** + * 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 + */ + NameMappingValue.prototype.attribute = ""; + + /** + * Creates a new NameMappingValue instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @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.INameMappingValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance */ - SQLServerDialect.create = function create(properties) { - return new SQLServerDialect(properties); + NameMappingValue.create = function create(properties) { + return new NameMappingValue(properties); }; /** - * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.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.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect 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 */ - SQLServerDialect.encode = function encode(message, writer) { + NameMappingValue.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); 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 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.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect 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 */ - SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SQLServerDialect 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.SQLServerDialect + * @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.SQLServerDialect} SQLServerDialect + * @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 */ - SQLServerDialect.decode = function decode(reader, length) { + NameMappingValue.decode = function decode(reader, length) { 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.NameMappingValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.database = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + case 3: { + message.relation = reader.string(); + break; + } + case 4: { + message.attribute = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6427,108 +9407,150 @@ }; /** - * Decodes a SQLServerDialect 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.SQLServerDialect + * @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.SQLServerDialect} SQLServerDialect + * @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 */ - SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { + NameMappingValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SQLServerDialect message. + * Verifies a NameMappingValue message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @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 */ - SQLServerDialect.verify = function verify(message) { + NameMappingValue.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"; return null; }; /** - * Creates a SQLServerDialect 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.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue */ - SQLServerDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLServerDialect) + NameMappingValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) return object; - return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); + 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 a SQLServerDialect 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.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect + * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SQLServerDialect.toObject = function toObject() { - return {}; + NameMappingValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = ""; + object.schema = ""; + object.relation = ""; + object.attribute = ""; + } + 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 SQLServerDialect to JSON. + * Converts this NameMappingValue to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance * @returns {Object.} JSON object */ - SQLServerDialect.prototype.toJSON = function toJSON() { + NameMappingValue.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 NameMappingValue * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingValue.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.NameMappingValue"; }; - return SQLServerDialect; + return NameMappingValue; })(); - v2.PostgresqlDialect = (function() { + v2.SourceEnv = (function() { /** - * Properties of a PostgresqlDialect. + * Properties of a SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPostgresqlDialect + * @interface ISourceEnv + * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset */ /** - * Constructs a new PostgresqlDialect. + * Constructs a new SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PostgresqlDialect. - * @implements IPostgresqlDialect + * @classdesc Represents a SourceEnv. + * @implements ISourceEnv * @constructor - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set */ - function PostgresqlDialect(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) @@ -6536,63 +9558,108 @@ } /** - * Creates a new PostgresqlDialect instance using the specified properties. + * 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 + * @instance + */ + SourceEnv.prototype.metadataStoreDataset = ""; + + /** + * Creates a new SourceEnv instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @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.ISourceEnv=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance */ - PostgresqlDialect.create = function create(properties) { - return new PostgresqlDialect(properties); + SourceEnv.create = function create(properties) { + return new SourceEnv(properties); }; /** - * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.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.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect 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 */ - PostgresqlDialect.encode = function encode(message, writer) { + SourceEnv.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); 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 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.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect 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 */ - PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { + SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgresqlDialect 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.PostgresqlDialect + * @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.PostgresqlDialect} PostgresqlDialect + * @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 */ - PostgresqlDialect.decode = function decode(reader, length) { + SourceEnv.decode = function decode(reader, length) { 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.SourceEnv(); while (reader.pos < end) { var tag = reader.uint32(); 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(); + break; + } default: reader.skipType(tag & 7); break; @@ -6602,108 +9669,159 @@ }; /** - * Decodes a PostgresqlDialect 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.PostgresqlDialect + * @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.PostgresqlDialect} PostgresqlDialect + * @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 */ - PostgresqlDialect.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 PostgresqlDialect message. + * Verifies a SourceEnv message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @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 */ - PostgresqlDialect.verify = function verify(message) { + SourceEnv.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.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + if (!$util.isString(message.metadataStoreDataset)) + return "metadataStoreDataset: string expected"; return null; }; /** - * Creates a PostgresqlDialect 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.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv */ - PostgresqlDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PostgresqlDialect) + SourceEnv.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) return object; - return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); + 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.metadataStoreDataset != null) + message.metadataStoreDataset = String(object.metadataStoreDataset); + return message; }; /** - * Creates a plain object from a PostgresqlDialect 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.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect + * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlDialect.toObject = function toObject() { - return {}; + SourceEnv.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.schemaSearchPath = []; + if (options.defaults) { + object.defaultDatabase = ""; + object.metadataStoreDataset = ""; + } + 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 PostgresqlDialect to JSON. + * Converts this SourceEnv to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance * @returns {Object.} JSON object */ - PostgresqlDialect.prototype.toJSON = function toJSON() { + SourceEnv.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 SourceEnv * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceEnv.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.SourceEnv"; }; - return PostgresqlDialect; + return SourceEnv; })(); - v2.PrestoDialect = (function() { + v2.TranslationDetails = (function() { /** - * Properties of a PrestoDialect. + * Properties of a TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPrestoDialect + * @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 PrestoDialect. + * Constructs a new TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PrestoDialect. - * @implements IPrestoDialect + * @classdesc Represents a TranslationDetails. + * @implements ITranslationDetails * @constructor - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set */ - function PrestoDialect(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) @@ -6711,63 +9829,142 @@ } /** - * Creates a new PrestoDialect instance using the specified properties. + * TranslationDetails sourceTargetMapping. + * @member {Array.} sourceTargetMapping + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.sourceTargetMapping = $util.emptyArray; + + /** + * TranslationDetails targetBaseUri. + * @member {string} targetBaseUri + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.targetBaseUri = ""; + + /** + * TranslationDetails sourceEnvironment. + * @member {google.cloud.bigquery.migration.v2.ISourceEnvironment|null|undefined} sourceEnvironment + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.sourceEnvironment = null; + + /** + * TranslationDetails targetReturnLiterals. + * @member {Array.} targetReturnLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.targetReturnLiterals = $util.emptyArray; + + /** + * TranslationDetails targetTypes. + * @member {Array.} targetTypes + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.targetTypes = $util.emptyArray; + + /** + * Creates a new TranslationDetails instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @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.ITranslationDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance */ - PrestoDialect.create = function create(properties) { - return new PrestoDialect(properties); + TranslationDetails.create = function create(properties) { + return new TranslationDetails(properties); }; /** - * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.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.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect 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 */ - PrestoDialect.encode = function encode(message, writer) { + TranslationDetails.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]); 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 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.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect 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 */ - PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { + TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrestoDialect 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.PrestoDialect + * @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.PrestoDialect} PrestoDialect + * @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 */ - PrestoDialect.decode = function decode(reader, length) { + TranslationDetails.decode = function decode(reader, length) { 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.TranslationDetails(); while (reader.pos < end) { var tag = reader.uint32(); 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())); + 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()); + break; + } default: reader.skipType(tag & 7); break; @@ -6777,108 +9974,204 @@ }; /** - * Decodes a PrestoDialect 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.PrestoDialect + * @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.PrestoDialect} PrestoDialect + * @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 */ - PrestoDialect.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 PrestoDialect message. + * Verifies a TranslationDetails message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @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 */ - PrestoDialect.verify = function verify(message) { + TranslationDetails.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.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 PrestoDialect 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.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails */ - PrestoDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PrestoDialect) + TranslationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) return object; - return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); + 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]); + } + return message; }; /** - * Creates a plain object from a PrestoDialect 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.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect + * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrestoDialect.toObject = function toObject() { - return {}; + 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.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]; + } + return object; }; /** - * Converts this PrestoDialect to JSON. + * Converts this TranslationDetails to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance * @returns {Object.} JSON object */ - PrestoDialect.prototype.toJSON = function toJSON() { + TranslationDetails.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 TranslationDetails * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationDetails.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.TranslationDetails"; }; - return PrestoDialect; + return TranslationDetails; })(); - v2.MySQLDialect = (function() { + v2.SourceTargetMapping = (function() { /** - * Properties of a MySQLDialect. + * Properties of a SourceTargetMapping. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMySQLDialect + * @interface ISourceTargetMapping + * @property {google.cloud.bigquery.migration.v2.ISourceSpec|null} [sourceSpec] SourceTargetMapping sourceSpec + * @property {google.cloud.bigquery.migration.v2.ITargetSpec|null} [targetSpec] SourceTargetMapping targetSpec */ /** - * Constructs a new MySQLDialect. + * Constructs a new SourceTargetMapping. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MySQLDialect. - * @implements IMySQLDialect + * @classdesc Represents a SourceTargetMapping. + * @implements ISourceTargetMapping * @constructor - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping=} [properties] Properties to set */ - function MySQLDialect(properties) { + function SourceTargetMapping(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6886,63 +10179,91 @@ } /** - * Creates a new MySQLDialect instance using the specified properties. + * SourceTargetMapping sourceSpec. + * @member {google.cloud.bigquery.migration.v2.ISourceSpec|null|undefined} sourceSpec + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @instance + */ + SourceTargetMapping.prototype.sourceSpec = null; + + /** + * SourceTargetMapping targetSpec. + * @member {google.cloud.bigquery.migration.v2.ITargetSpec|null|undefined} targetSpec + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @instance + */ + SourceTargetMapping.prototype.targetSpec = null; + + /** + * Creates a new SourceTargetMapping instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @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.ISourceTargetMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping instance */ - MySQLDialect.create = function create(properties) { - return new MySQLDialect(properties); + SourceTargetMapping.create = function create(properties) { + return new SourceTargetMapping(properties); }; /** - * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * Encodes the specified SourceTargetMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceTargetMapping.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping} message SourceTargetMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encode = function encode(message, writer) { + SourceTargetMapping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.sourceSpec != null && Object.hasOwnProperty.call(message, "sourceSpec")) + $root.google.cloud.bigquery.migration.v2.SourceSpec.encode(message.sourceSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetSpec != null && Object.hasOwnProperty.call(message, "targetSpec")) + $root.google.cloud.bigquery.migration.v2.TargetSpec.encode(message.targetSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); 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 SourceTargetMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceTargetMapping.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping} message SourceTargetMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + SourceTargetMapping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MySQLDialect message from the specified reader or buffer. + * Decodes a SourceTargetMapping message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @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.SourceTargetMapping} SourceTargetMapping * @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) { + SourceTargetMapping.decode = function decode(reader, length) { 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.SourceTargetMapping(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.sourceSpec = $root.google.cloud.bigquery.migration.v2.SourceSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.targetSpec = $root.google.cloud.bigquery.migration.v2.TargetSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6952,110 +10273,143 @@ }; /** - * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. + * Decodes a SourceTargetMapping message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @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.SourceTargetMapping} SourceTargetMapping * @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) { + SourceTargetMapping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MySQLDialect message. + * Verifies a SourceTargetMapping message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @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) { + SourceTargetMapping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.sourceSpec != null && message.hasOwnProperty("sourceSpec")) { + var error = $root.google.cloud.bigquery.migration.v2.SourceSpec.verify(message.sourceSpec); + if (error) + return "sourceSpec." + error; + } + if (message.targetSpec != null && message.hasOwnProperty("targetSpec")) { + var error = $root.google.cloud.bigquery.migration.v2.TargetSpec.verify(message.targetSpec); + if (error) + return "targetSpec." + error; + } return null; }; /** - * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SourceTargetMapping 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.SourceTargetMapping * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping */ - MySQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) + SourceTargetMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceTargetMapping) return object; - return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.SourceTargetMapping(); + if (object.sourceSpec != null) { + if (typeof object.sourceSpec !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.SourceTargetMapping.sourceSpec: object expected"); + message.sourceSpec = $root.google.cloud.bigquery.migration.v2.SourceSpec.fromObject(object.sourceSpec); + } + if (object.targetSpec != null) { + if (typeof object.targetSpec !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.SourceTargetMapping.targetSpec: object expected"); + message.targetSpec = $root.google.cloud.bigquery.migration.v2.TargetSpec.fromObject(object.targetSpec); + } + return message; }; /** - * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a SourceTargetMapping message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @static - * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect + * @param {google.cloud.bigquery.migration.v2.SourceTargetMapping} message SourceTargetMapping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MySQLDialect.toObject = function toObject() { - return {}; + SourceTargetMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceSpec = null; + object.targetSpec = null; + } + if (message.sourceSpec != null && message.hasOwnProperty("sourceSpec")) + object.sourceSpec = $root.google.cloud.bigquery.migration.v2.SourceSpec.toObject(message.sourceSpec, options); + if (message.targetSpec != null && message.hasOwnProperty("targetSpec")) + object.targetSpec = $root.google.cloud.bigquery.migration.v2.TargetSpec.toObject(message.targetSpec, options); + return object; }; /** - * Converts this MySQLDialect to JSON. + * Converts this SourceTargetMapping to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @instance * @returns {Object.} JSON object */ - MySQLDialect.prototype.toJSON = function toJSON() { + SourceTargetMapping.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 SourceTargetMapping * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceTargetMapping.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.SourceTargetMapping"; }; - return MySQLDialect; + return SourceTargetMapping; })(); - v2.ObjectNameMappingList = (function() { + v2.SourceSpec = (function() { /** - * Properties of an ObjectNameMappingList. + * Properties of a SourceSpec. * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMappingList - * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap + * @interface ISourceSpec + * @property {string|null} [baseUri] SourceSpec baseUri + * @property {google.cloud.bigquery.migration.v2.ILiteral|null} [literal] SourceSpec literal + * @property {string|null} [encoding] SourceSpec encoding */ /** - * Constructs a new ObjectNameMappingList. + * Constructs a new SourceSpec. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMappingList. - * @implements IObjectNameMappingList + * @classdesc Represents a SourceSpec. + * @implements ISourceSpec * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceSpec=} [properties] Properties to set */ - function ObjectNameMappingList(properties) { - this.nameMap = []; + function SourceSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7063,78 +10417,117 @@ } /** - * ObjectNameMappingList nameMap. - * @member {Array.} nameMap - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * SourceSpec baseUri. + * @member {string|null|undefined} baseUri + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @instance */ - ObjectNameMappingList.prototype.nameMap = $util.emptyArray; + SourceSpec.prototype.baseUri = null; /** - * Creates a new ObjectNameMappingList instance using the specified properties. + * SourceSpec literal. + * @member {google.cloud.bigquery.migration.v2.ILiteral|null|undefined} literal + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.literal = null; + + /** + * SourceSpec encoding. + * @member {string} encoding + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.encoding = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceSpec source. + * @member {"baseUri"|"literal"|undefined} source + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + Object.defineProperty(SourceSpec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceSpec instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @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.ISourceSpec=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec instance */ - ObjectNameMappingList.create = function create(properties) { - return new ObjectNameMappingList(properties); + SourceSpec.create = function create(properties) { + return new SourceSpec(properties); }; /** - * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * Encodes the specified SourceSpec message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceSpec} message SourceSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encode = function encode(message, writer) { + SourceSpec.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.baseUri != null && Object.hasOwnProperty.call(message, "baseUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseUri); + if (message.literal != null && Object.hasOwnProperty.call(message, "literal")) + $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); 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 SourceSpec message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceSpec} message SourceSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { + SourceSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * Decodes a SourceSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @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.SourceSpec} SourceSpec * @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) { + SourceSpec.decode = function decode(reader, length) { 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.SourceSpec(); while (reader.pos < end) { var tag = reader.uint32(); 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.baseUri = reader.string(); + break; + } + case 2: { + message.literal = $root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32()); + break; + } + case 3: { + message.encoding = reader.string(); break; } default: @@ -7146,140 +10539,155 @@ }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * Decodes a SourceSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @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.SourceSpec} SourceSpec * @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) { + SourceSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMappingList message. + * Verifies a SourceSpec message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @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) { + SourceSpec.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]); + var properties = {}; + if (message.baseUri != null && message.hasOwnProperty("baseUri")) { + properties.source = 1; + if (!$util.isString(message.baseUri)) + return "baseUri: string expected"; + } + if (message.literal != null && message.hasOwnProperty("literal")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.literal); if (error) - return "nameMap." + error; + return "literal." + error; } } + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; return null; }; /** - * Creates an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. + * Creates a SourceSpec 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.SourceSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec */ - ObjectNameMappingList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) + SourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceSpec) 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.SourceSpec(); + if (object.baseUri != null) + message.baseUri = String(object.baseUri); + if (object.literal != null) { + if (typeof object.literal !== "object") + 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.encoding != null) + message.encoding = String(object.encoding); return message; }; /** - * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. + * Creates a plain object from a SourceSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList + * @param {google.cloud.bigquery.migration.v2.SourceSpec} message SourceSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMappingList.toObject = function toObject(message, options) { + SourceSpec.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.encoding = ""; + if (message.baseUri != null && message.hasOwnProperty("baseUri")) { + object.baseUri = message.baseUri; + if (options.oneofs) + object.source = "baseUri"; + } + if (message.literal != null && message.hasOwnProperty("literal")) { + object.literal = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.literal, options); + if (options.oneofs) + object.source = "literal"; } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; return object; }; /** - * Converts this ObjectNameMappingList to JSON. + * Converts this SourceSpec to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @instance * @returns {Object.} JSON object */ - ObjectNameMappingList.prototype.toJSON = function toJSON() { + SourceSpec.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 SourceSpec * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceSpec.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.SourceSpec"; }; - return ObjectNameMappingList; + return SourceSpec; })(); - v2.ObjectNameMapping = (function() { + v2.TargetSpec = (function() { /** - * Properties of an ObjectNameMapping. + * Properties of a TargetSpec. * @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 ITargetSpec + * @property {string|null} [relativePath] TargetSpec relativePath */ /** - * Constructs a new ObjectNameMapping. + * Constructs a new TargetSpec. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMapping. - * @implements IObjectNameMapping + * @classdesc Represents a TargetSpec. + * @implements ITargetSpec * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITargetSpec=} [properties] Properties to set */ - function ObjectNameMapping(properties) { + function TargetSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7287,89 +10695,75 @@ } /** - * 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 + * TargetSpec relativePath. + * @member {string} relativePath + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @instance */ - ObjectNameMapping.prototype.target = null; + TargetSpec.prototype.relativePath = ""; /** - * Creates a new ObjectNameMapping instance using the specified properties. + * Creates a new TargetSpec instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @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.ITargetSpec=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec instance */ - ObjectNameMapping.create = function create(properties) { - return new ObjectNameMapping(properties); + TargetSpec.create = function create(properties) { + return new TargetSpec(properties); }; /** - * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * Encodes the specified TargetSpec message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TargetSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITargetSpec} message TargetSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encode = function encode(message, writer) { + TargetSpec.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.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.relativePath); 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 TargetSpec message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TargetSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITargetSpec} message TargetSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { + TargetSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer. + * Decodes a TargetSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @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.TargetSpec} TargetSpec * @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) { + TargetSpec.decode = function decode(reader, length) { 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.TargetSpec(); while (reader.pos < end) { var tag = reader.uint32(); 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()); + message.relativePath = reader.string(); break; } default: @@ -7381,145 +10775,124 @@ }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * Decodes a TargetSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @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.TargetSpec} TargetSpec * @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) { + TargetSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMapping message. + * Verifies a TargetSpec message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @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) { + TargetSpec.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.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; return null; }; /** - * Creates an ObjectNameMapping message from a plain object. Also converts values to their respective internal types. + * Creates a TargetSpec 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.TargetSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec */ - ObjectNameMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) + TargetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TargetSpec) 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.TargetSpec(); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); return message; }; /** - * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. + * Creates a plain object from a TargetSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping + * @param {google.cloud.bigquery.migration.v2.TargetSpec} message TargetSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMapping.toObject = function toObject(message, options) { + TargetSpec.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); + if (options.defaults) + object.relativePath = ""; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; return object; }; /** - * Converts this ObjectNameMapping to JSON. + * Converts this TargetSpec to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @instance * @returns {Object.} JSON object */ - ObjectNameMapping.prototype.toJSON = function toJSON() { + TargetSpec.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 TargetSpec * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.TargetSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TargetSpec.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.TargetSpec"; }; - return ObjectNameMapping; + return TargetSpec; })(); - v2.NameMappingKey = (function() { + v2.Literal = (function() { /** - * Properties of a NameMappingKey. + * Properties of a Literal. * @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 ILiteral + * @property {string|null} [literalString] Literal literalString + * @property {Uint8Array|null} [literalBytes] Literal literalBytes + * @property {string|null} [relativePath] Literal relativePath */ /** - * Constructs a new NameMappingKey. + * Constructs a new Literal. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingKey. - * @implements INameMappingKey + * @classdesc Represents a Literal. + * @implements ILiteral * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ILiteral=} [properties] Properties to set */ - function NameMappingKey(properties) { + function Literal(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7527,131 +10900,117 @@ } /** - * 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 + * Literal literalString. + * @member {string|null|undefined} literalString + * @memberof google.cloud.bigquery.migration.v2.Literal * @instance */ - NameMappingKey.prototype.database = ""; + Literal.prototype.literalString = null; /** - * NameMappingKey schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * Literal literalBytes. + * @member {Uint8Array|null|undefined} literalBytes + * @memberof google.cloud.bigquery.migration.v2.Literal * @instance */ - NameMappingKey.prototype.schema = ""; + Literal.prototype.literalBytes = null; /** - * NameMappingKey relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * Literal relativePath. + * @member {string} relativePath + * @memberof google.cloud.bigquery.migration.v2.Literal * @instance */ - NameMappingKey.prototype.relation = ""; + Literal.prototype.relativePath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * NameMappingKey attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * Literal literalData. + * @member {"literalString"|"literalBytes"|undefined} literalData + * @memberof google.cloud.bigquery.migration.v2.Literal * @instance */ - NameMappingKey.prototype.attribute = ""; + Object.defineProperty(Literal.prototype, "literalData", { + get: $util.oneOfGetter($oneOfFields = ["literalString", "literalBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new NameMappingKey instance using the specified properties. + * Creates a new Literal instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @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.ILiteral=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.Literal} Literal instance */ - NameMappingKey.create = function create(properties) { - return new NameMappingKey(properties); + Literal.create = function create(properties) { + return new Literal(properties); }; /** - * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * Encodes the specified Literal message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Literal.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ILiteral} message Literal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encode = function encode(message, writer) { + Literal.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.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.relativePath); + if (message.literalString != null && Object.hasOwnProperty.call(message, "literalString")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.literalString); + if (message.literalBytes != null && Object.hasOwnProperty.call(message, "literalBytes")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.literalBytes); 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 Literal message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Literal.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ILiteral} message Literal message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { + Literal.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingKey message from the specified reader or buffer. + * Decodes a Literal message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @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.Literal} Literal * @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) { + Literal.decode = function decode(reader, length) { 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.Literal(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } case 2: { - message.database = reader.string(); + message.literalString = reader.string(); break; } case 3: { - message.schema = reader.string(); - break; - } - case 4: { - message.relation = reader.string(); + message.literalBytes = reader.bytes(); break; } - case 5: { - message.attribute = reader.string(); + case 1: { + message.relativePath = reader.string(); break; } default: @@ -7663,233 +11022,155 @@ }; /** - * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * Decodes a Literal message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @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.Literal} Literal * @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) { + Literal.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingKey message. + * Verifies a Literal message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @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) { + Literal.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"; + var properties = {}; + if (message.literalString != null && message.hasOwnProperty("literalString")) { + properties.literalData = 1; + if (!$util.isString(message.literalString)) + return "literalString: string expected"; + } + if (message.literalBytes != null && message.hasOwnProperty("literalBytes")) { + if (properties.literalData === 1) + return "literalData: multiple values"; + properties.literalData = 1; + if (!(message.literalBytes && typeof message.literalBytes.length === "number" || $util.isString(message.literalBytes))) + return "literalBytes: buffer expected"; + } + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; return null; }; /** - * Creates a NameMappingKey message from a plain object. Also converts values to their respective internal types. + * Creates a Literal 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.Literal * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.Literal} Literal */ - NameMappingKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) + Literal.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.Literal) 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; - } - 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.Literal(); + if (object.literalString != null) + message.literalString = String(object.literalString); + if (object.literalBytes != null) + if (typeof object.literalBytes === "string") + $util.base64.decode(object.literalBytes, message.literalBytes = $util.newBuffer($util.base64.length(object.literalBytes)), 0); + else if (object.literalBytes.length >= 0) + message.literalBytes = object.literalBytes; + if (object.relativePath != null) + message.relativePath = String(object.relativePath); return message; }; /** - * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. + * Creates a plain object from a Literal message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey + * @param {google.cloud.bigquery.migration.v2.Literal} message Literal * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingKey.toObject = function toObject(message, options) { + Literal.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + if (options.defaults) + object.relativePath = ""; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + if (message.literalString != null && message.hasOwnProperty("literalString")) { + object.literalString = message.literalString; + if (options.oneofs) + object.literalData = "literalString"; + } + if (message.literalBytes != null && message.hasOwnProperty("literalBytes")) { + object.literalBytes = options.bytes === String ? $util.base64.encode(message.literalBytes, 0, message.literalBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.literalBytes) : message.literalBytes; + if (options.oneofs) + object.literalData = "literalBytes"; } - 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 NameMappingKey to JSON. + * Converts this Literal to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @instance * @returns {Object.} JSON object */ - NameMappingKey.prototype.toJSON = function toJSON() { + Literal.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 Literal * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.Literal * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Literal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Literal"; }; - /** - * 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; + return Literal; })(); - v2.NameMappingValue = (function() { + v2.SourceEnvironment = (function() { /** - * Properties of a NameMappingValue. + * Properties of a SourceEnvironment. * @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 ISourceEnvironment + * @property {string|null} [defaultDatabase] SourceEnvironment defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnvironment schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnvironment metadataStoreDataset */ /** - * Constructs a new NameMappingValue. + * Constructs a new SourceEnvironment. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingValue. - * @implements INameMappingValue + * @classdesc Represents a SourceEnvironment. + * @implements ISourceEnvironment * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment=} [properties] Properties to set */ - function NameMappingValue(properties) { + function SourceEnvironment(properties) { + this.schemaSearchPath = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7897,117 +11178,106 @@ } /** - * NameMappingValue database. - * @member {string} database - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @instance - */ - NameMappingValue.prototype.database = ""; - - /** - * NameMappingValue schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * SourceEnvironment defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @instance */ - NameMappingValue.prototype.schema = ""; + SourceEnvironment.prototype.defaultDatabase = ""; /** - * NameMappingValue relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * SourceEnvironment schemaSearchPath. + * @member {Array.} schemaSearchPath + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @instance */ - NameMappingValue.prototype.relation = ""; + SourceEnvironment.prototype.schemaSearchPath = $util.emptyArray; /** - * NameMappingValue attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * SourceEnvironment metadataStoreDataset. + * @member {string} metadataStoreDataset + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @instance */ - NameMappingValue.prototype.attribute = ""; + SourceEnvironment.prototype.metadataStoreDataset = ""; /** - * Creates a new NameMappingValue instance using the specified properties. + * Creates a new SourceEnvironment instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @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.ISourceEnvironment=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment instance */ - NameMappingValue.create = function create(properties) { - return new NameMappingValue(properties); + SourceEnvironment.create = function create(properties) { + return new SourceEnvironment(properties); }; /** - * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * Encodes the specified SourceEnvironment message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnvironment.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @static - * @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 - */ - NameMappingValue.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); + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @static + * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment} message SourceEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceEnvironment.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); 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 SourceEnvironment message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnvironment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment} message SourceEnvironment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { + SourceEnvironment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingValue message from the specified reader or buffer. + * Decodes a SourceEnvironment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @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.SourceEnvironment} SourceEnvironment * @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) { + SourceEnvironment.decode = function decode(reader, length) { 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.SourceEnvironment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.database = reader.string(); + message.defaultDatabase = reader.string(); break; } case 2: { - message.schema = reader.string(); + if (!(message.schemaSearchPath && message.schemaSearchPath.length)) + message.schemaSearchPath = []; + message.schemaSearchPath.push(reader.string()); break; } case 3: { - message.relation = reader.string(); - break; - } - case 4: { - message.attribute = reader.string(); + message.metadataStoreDataset = reader.string(); break; } default: @@ -8019,149 +11289,162 @@ }; /** - * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @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.SourceEnvironment} SourceEnvironment * @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) { + SourceEnvironment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingValue message. + * Verifies a SourceEnvironment message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @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) { + SourceEnvironment.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.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 NameMappingValue message from a plain object. Also converts values to their respective internal types. + * Creates a SourceEnvironment 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.SourceEnvironment * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment */ - NameMappingValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) + SourceEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnvironment) 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.SourceEnvironment(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.schemaSearchPath) { + if (!Array.isArray(object.schemaSearchPath)) + throw TypeError(".google.cloud.bigquery.migration.v2.SourceEnvironment.schemaSearchPath: array expected"); + message.schemaSearchPath = []; + for (var i = 0; i < object.schemaSearchPath.length; ++i) + message.schemaSearchPath[i] = String(object.schemaSearchPath[i]); + } + if (object.metadataStoreDataset != null) + message.metadataStoreDataset = String(object.metadataStoreDataset); return message; }; /** - * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. + * Creates a plain object from a SourceEnvironment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue + * @param {google.cloud.bigquery.migration.v2.SourceEnvironment} message SourceEnvironment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingValue.toObject = function toObject(message, options) { + SourceEnvironment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.schemaSearchPath = []; if (options.defaults) { - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + object.defaultDatabase = ""; + object.metadataStoreDataset = ""; } - 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 NameMappingValue to JSON. + * Converts this SourceEnvironment to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @instance * @returns {Object.} JSON object */ - NameMappingValue.prototype.toJSON = function toJSON() { + SourceEnvironment.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 SourceEnvironment * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceEnvironment.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.SourceEnvironment"; }; - return NameMappingValue; + return SourceEnvironment; })(); - v2.SourceEnv = (function() { + v2.GcsReportLogMessage = (function() { /** - * Properties of a SourceEnv. + * Properties of a GcsReportLogMessage. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceEnv - * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase - * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath - */ - - /** - * Constructs a new SourceEnv. + * @interface IGcsReportLogMessage + * @property {string|null} [severity] GcsReportLogMessage severity + * @property {string|null} [category] GcsReportLogMessage category + * @property {string|null} [filePath] GcsReportLogMessage filePath + * @property {string|null} [filename] GcsReportLogMessage filename + * @property {number|null} [sourceScriptLine] GcsReportLogMessage sourceScriptLine + * @property {number|null} [sourceScriptColumn] GcsReportLogMessage sourceScriptColumn + * @property {string|null} [message] GcsReportLogMessage message + * @property {string|null} [scriptContext] GcsReportLogMessage scriptContext + * @property {string|null} [action] GcsReportLogMessage action + * @property {string|null} [effect] GcsReportLogMessage effect + * @property {string|null} [objectName] GcsReportLogMessage objectName + */ + + /** + * Constructs a new GcsReportLogMessage. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceEnv. - * @implements ISourceEnv + * @classdesc Represents a GcsReportLogMessage. + * @implements IGcsReportLogMessage * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage=} [properties] Properties to set */ - function SourceEnv(properties) { - this.schemaSearchPath = []; + function GcsReportLogMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8169,92 +11452,215 @@ } /** - * SourceEnv defaultDatabase. - * @member {string} defaultDatabase - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * GcsReportLogMessage severity. + * @member {string} severity + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @instance */ - SourceEnv.prototype.defaultDatabase = ""; + GcsReportLogMessage.prototype.severity = ""; /** - * SourceEnv schemaSearchPath. - * @member {Array.} schemaSearchPath - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * GcsReportLogMessage category. + * @member {string} category + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @instance */ - SourceEnv.prototype.schemaSearchPath = $util.emptyArray; + GcsReportLogMessage.prototype.category = ""; /** - * Creates a new SourceEnv instance using the specified properties. + * GcsReportLogMessage filePath. + * @member {string} filePath + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.filePath = ""; + + /** + * GcsReportLogMessage filename. + * @member {string} filename + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.filename = ""; + + /** + * GcsReportLogMessage sourceScriptLine. + * @member {number} sourceScriptLine + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.sourceScriptLine = 0; + + /** + * GcsReportLogMessage sourceScriptColumn. + * @member {number} sourceScriptColumn + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.sourceScriptColumn = 0; + + /** + * GcsReportLogMessage message. + * @member {string} message + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.message = ""; + + /** + * GcsReportLogMessage scriptContext. + * @member {string} scriptContext + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.scriptContext = ""; + + /** + * GcsReportLogMessage action. + * @member {string} action + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.action = ""; + + /** + * GcsReportLogMessage effect. + * @member {string} effect + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.effect = ""; + + /** + * GcsReportLogMessage objectName. + * @member {string} objectName + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.objectName = ""; + + /** + * Creates a new GcsReportLogMessage instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @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.IGcsReportLogMessage=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage instance */ - SourceEnv.create = function create(properties) { - return new SourceEnv(properties); + GcsReportLogMessage.create = function create(properties) { + return new GcsReportLogMessage(properties); }; /** - * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * Encodes the specified GcsReportLogMessage message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage} message GcsReportLogMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encode = function encode(message, writer) { + GcsReportLogMessage.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.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.severity); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.category); + if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filePath); + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filename); + if (message.sourceScriptLine != null && Object.hasOwnProperty.call(message, "sourceScriptLine")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sourceScriptLine); + if (message.sourceScriptColumn != null && Object.hasOwnProperty.call(message, "sourceScriptColumn")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sourceScriptColumn); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); + if (message.scriptContext != null && Object.hasOwnProperty.call(message, "scriptContext")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.scriptContext); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.action); + if (message.effect != null && Object.hasOwnProperty.call(message, "effect")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.effect); + if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.objectName); 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 GcsReportLogMessage message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage} message GcsReportLogMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { + GcsReportLogMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceEnv message from the specified reader or buffer. + * Decodes a GcsReportLogMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @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.GcsReportLogMessage} GcsReportLogMessage * @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) { + GcsReportLogMessage.decode = function decode(reader, length) { 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.GcsReportLogMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.defaultDatabase = reader.string(); + message.severity = reader.string(); break; } case 2: { - if (!(message.schemaSearchPath && message.schemaSearchPath.length)) - message.schemaSearchPath = []; - message.schemaSearchPath.push(reader.string()); + message.category = reader.string(); + break; + } + case 3: { + message.filePath = reader.string(); + break; + } + case 4: { + message.filename = reader.string(); + break; + } + case 5: { + message.sourceScriptLine = reader.int32(); + break; + } + case 6: { + message.sourceScriptColumn = reader.int32(); + break; + } + case 7: { + message.message = reader.string(); + break; + } + case 8: { + message.scriptContext = reader.string(); + break; + } + case 9: { + message.action = reader.string(); + break; + } + case 10: { + message.effect = reader.string(); + break; + } + case 11: { + message.objectName = reader.string(); break; } default: @@ -8266,123 +11672,183 @@ }; /** - * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @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.GcsReportLogMessage} GcsReportLogMessage * @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) { + GcsReportLogMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceEnv message. - * @function verify - * @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 - */ - SourceEnv.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"; - } + * Verifies a GcsReportLogMessage message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsReportLogMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + if (!$util.isString(message.severity)) + return "severity: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.filename != null && message.hasOwnProperty("filename")) + if (!$util.isString(message.filename)) + return "filename: string expected"; + if (message.sourceScriptLine != null && message.hasOwnProperty("sourceScriptLine")) + if (!$util.isInteger(message.sourceScriptLine)) + return "sourceScriptLine: integer expected"; + if (message.sourceScriptColumn != null && message.hasOwnProperty("sourceScriptColumn")) + if (!$util.isInteger(message.sourceScriptColumn)) + return "sourceScriptColumn: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.scriptContext != null && message.hasOwnProperty("scriptContext")) + if (!$util.isString(message.scriptContext)) + return "scriptContext: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.effect != null && message.hasOwnProperty("effect")) + if (!$util.isString(message.effect)) + return "effect: string expected"; + if (message.objectName != null && message.hasOwnProperty("objectName")) + if (!$util.isString(message.objectName)) + return "objectName: string expected"; return null; }; /** - * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. + * Creates a GcsReportLogMessage 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.GcsReportLogMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage */ - SourceEnv.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) + GcsReportLogMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage) 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.GcsReportLogMessage(); + if (object.severity != null) + message.severity = String(object.severity); + if (object.category != null) + message.category = String(object.category); + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.filename != null) + message.filename = String(object.filename); + if (object.sourceScriptLine != null) + message.sourceScriptLine = object.sourceScriptLine | 0; + if (object.sourceScriptColumn != null) + message.sourceScriptColumn = object.sourceScriptColumn | 0; + if (object.message != null) + message.message = String(object.message); + if (object.scriptContext != null) + message.scriptContext = String(object.scriptContext); + if (object.action != null) + message.action = String(object.action); + if (object.effect != null) + message.effect = String(object.effect); + if (object.objectName != null) + message.objectName = String(object.objectName); return message; }; /** - * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. + * Creates a plain object from a GcsReportLogMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @static - * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv + * @param {google.cloud.bigquery.migration.v2.GcsReportLogMessage} message GcsReportLogMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceEnv.toObject = function toObject(message, options) { + GcsReportLogMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.schemaSearchPath = []; - if (options.defaults) - object.defaultDatabase = ""; - 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 (options.defaults) { + object.severity = ""; + object.category = ""; + object.filePath = ""; + object.filename = ""; + object.sourceScriptLine = 0; + object.sourceScriptColumn = 0; + object.message = ""; + object.scriptContext = ""; + object.action = ""; + object.effect = ""; + object.objectName = ""; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = message.severity; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.filename != null && message.hasOwnProperty("filename")) + object.filename = message.filename; + if (message.sourceScriptLine != null && message.hasOwnProperty("sourceScriptLine")) + object.sourceScriptLine = message.sourceScriptLine; + if (message.sourceScriptColumn != null && message.hasOwnProperty("sourceScriptColumn")) + object.sourceScriptColumn = message.sourceScriptColumn; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.scriptContext != null && message.hasOwnProperty("scriptContext")) + object.scriptContext = message.scriptContext; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.effect != null && message.hasOwnProperty("effect")) + object.effect = message.effect; + if (message.objectName != null && message.hasOwnProperty("objectName")) + object.objectName = message.objectName; return object; }; /** - * Converts this SourceEnv to JSON. + * Converts this GcsReportLogMessage to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @instance * @returns {Object.} JSON object */ - SourceEnv.prototype.toJSON = function toJSON() { + GcsReportLogMessage.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 GcsReportLogMessage * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsReportLogMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GcsReportLogMessage"; }; - return SourceEnv; + return GcsReportLogMessage; })(); v2.MigrationService = (function() { @@ -10828,6 +14294,349 @@ return ListMigrationSubtasksResponse; })(); + v2.TranslationReportRecord = (function() { + + /** + * Properties of a TranslationReportRecord. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITranslationReportRecord + * @property {google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity|null} [severity] TranslationReportRecord severity + * @property {number|null} [scriptLine] TranslationReportRecord scriptLine + * @property {number|null} [scriptColumn] TranslationReportRecord scriptColumn + * @property {string|null} [category] TranslationReportRecord category + * @property {string|null} [message] TranslationReportRecord message + */ + + /** + * Constructs a new TranslationReportRecord. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TranslationReportRecord. + * @implements ITranslationReportRecord + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITranslationReportRecord=} [properties] Properties to set + */ + function TranslationReportRecord(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]]; + } + + /** + * TranslationReportRecord severity. + * @member {google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity} severity + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + */ + TranslationReportRecord.prototype.severity = 0; + + /** + * TranslationReportRecord scriptLine. + * @member {number} scriptLine + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + */ + TranslationReportRecord.prototype.scriptLine = 0; + + /** + * TranslationReportRecord scriptColumn. + * @member {number} scriptColumn + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + */ + TranslationReportRecord.prototype.scriptColumn = 0; + + /** + * TranslationReportRecord category. + * @member {string} category + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + */ + TranslationReportRecord.prototype.category = ""; + + /** + * TranslationReportRecord message. + * @member {string} message + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + */ + TranslationReportRecord.prototype.message = ""; + + /** + * Creates a new TranslationReportRecord instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationReportRecord=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationReportRecord} TranslationReportRecord instance + */ + TranslationReportRecord.create = function create(properties) { + return new TranslationReportRecord(properties); + }; + + /** + * Encodes the specified TranslationReportRecord message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationReportRecord.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationReportRecord} message TranslationReportRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationReportRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); + if (message.scriptLine != null && Object.hasOwnProperty.call(message, "scriptLine")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scriptLine); + if (message.scriptColumn != null && Object.hasOwnProperty.call(message, "scriptColumn")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.scriptColumn); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.category); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.message); + return writer; + }; + + /** + * Encodes the specified TranslationReportRecord message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationReportRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationReportRecord} message TranslationReportRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationReportRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationReportRecord message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @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.TranslationReportRecord} TranslationReportRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationReportRecord.decode = function decode(reader, length) { + 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.TranslationReportRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.severity = reader.int32(); + break; + } + case 2: { + message.scriptLine = reader.int32(); + break; + } + case 3: { + message.scriptColumn = reader.int32(); + break; + } + case 4: { + message.category = reader.string(); + break; + } + case 5: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationReportRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.TranslationReportRecord} TranslationReportRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationReportRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationReportRecord message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationReportRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.scriptLine != null && message.hasOwnProperty("scriptLine")) + if (!$util.isInteger(message.scriptLine)) + return "scriptLine: integer expected"; + if (message.scriptColumn != null && message.hasOwnProperty("scriptColumn")) + if (!$util.isInteger(message.scriptColumn)) + return "scriptColumn: integer expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a TranslationReportRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TranslationReportRecord} TranslationReportRecord + */ + TranslationReportRecord.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationReportRecord) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.TranslationReportRecord(); + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "INFO": + case 1: + message.severity = 1; + break; + case "WARNING": + case 2: + message.severity = 2; + break; + case "ERROR": + case 3: + message.severity = 3; + break; + } + if (object.scriptLine != null) + message.scriptLine = object.scriptLine | 0; + if (object.scriptColumn != null) + message.scriptColumn = object.scriptColumn | 0; + if (object.category != null) + message.category = String(object.category); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a TranslationReportRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {google.cloud.bigquery.migration.v2.TranslationReportRecord} message TranslationReportRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationReportRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.scriptLine = 0; + object.scriptColumn = 0; + object.category = ""; + object.message = ""; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity[message.severity] : message.severity; + if (message.scriptLine != null && message.hasOwnProperty("scriptLine")) + object.scriptLine = message.scriptLine; + if (message.scriptColumn != null && message.hasOwnProperty("scriptColumn")) + object.scriptColumn = message.scriptColumn; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this TranslationReportRecord to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @instance + * @returns {Object.} JSON object + */ + TranslationReportRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationReportRecord + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TranslationReportRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationReportRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationReportRecord"; + }; + + /** + * Severity enum. + * @name google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ERROR=3 ERROR value + */ + TranslationReportRecord.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return TranslationReportRecord; + })(); + return v2; })(); diff --git a/packages/google-cloud-bigquery-migration/protos/protos.json b/packages/google-cloud-bigquery-migration/protos/protos.json index 516bb6849a9..57d4bc2847f 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.json +++ b/packages/google-cloud-bigquery-migration/protos/protos.json @@ -13,7 +13,7 @@ "csharp_namespace": "Google.Cloud.BigQuery.Migration.V2", "go_package": "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb", "java_multiple_files": true, - "java_outer_classname": "MigrationServiceProto", + "java_outer_classname": "TranslationSuggestionProto", "java_package": "com.google.cloud.bigquery.migration.v2", "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2" }, @@ -28,7 +28,7 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "IDENTIFIER" } }, "displayName": { @@ -72,7 +72,8 @@ "oneofs": { "taskDetails": { "oneof": [ - "translationConfigDetails" + "translationConfigDetails", + "translationDetails" ] } }, @@ -81,6 +82,10 @@ "type": "TranslationConfigDetails", "id": 14 }, + "translationDetails": { + "type": "TranslationDetails", + "id": 16 + }, "id": { "type": "string", "id": 1, @@ -113,6 +118,38 @@ "lastUpdateTime": { "type": "google.protobuf.Timestamp", "id": 7 + }, + "resourceErrorDetails": { + "rule": "repeated", + "type": "ResourceErrorDetail", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorCount": { + "type": "int32", + "id": 18 + }, + "metrics": { + "rule": "repeated", + "type": "TimeSeries", + "id": 19 + }, + "taskResult": { + "type": "MigrationTaskResult", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalProcessingErrorCount": { + "type": "int32", + "id": 21 + }, + "totalResourceErrorCount": { + "type": "int32", + "id": 22 } }, "nested": { @@ -204,6 +241,35 @@ } } }, + "MigrationTaskResult": { + "oneofs": { + "details": { + "oneof": [ + "translationTaskResult" + ] + } + }, + "fields": { + "translationTaskResult": { + "type": "TranslationTaskResult", + "id": 2 + } + } + }, + "TranslationTaskResult": { + "fields": { + "translatedLiterals": { + "rule": "repeated", + "type": "Literal", + "id": 1 + }, + "reportLogMessages": { + "rule": "repeated", + "type": "GcsReportLogMessage", + "id": 2 + } + } + }, "ResourceErrorDetail": { "fields": { "resourceInfo": { @@ -410,6 +476,11 @@ "requestSource": { "type": "string", "id": 8 + }, + "targetTypes": { + "rule": "repeated", + "type": "string", + "id": 9 } } }, @@ -430,7 +501,10 @@ "sqlServerDialect", "postgresqlDialect", "prestoDialect", - "mysqlDialect" + "mysqlDialect", + "db2Dialect", + "sqliteDialect", + "greenplumDialect" ] } }, @@ -490,6 +564,18 @@ "mysqlDialect": { "type": "MySQLDialect", "id": 14 + }, + "db2Dialect": { + "type": "DB2Dialect", + "id": 15 + }, + "sqliteDialect": { + "type": "SQLiteDialect", + "id": 16 + }, + "greenplumDialect": { + "type": "GreenplumDialect", + "id": 17 } } }, @@ -549,6 +635,15 @@ "MySQLDialect": { "fields": {} }, + "DB2Dialect": { + "fields": {} + }, + "SQLiteDialect": { + "fields": {} + }, + "GreenplumDialect": { + "fields": {} + }, "ObjectNameMappingList": { "fields": { "nameMap": { @@ -638,6 +733,182 @@ "rule": "repeated", "type": "string", "id": 2 + }, + "metadataStoreDataset": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TranslationDetails": { + "fields": { + "sourceTargetMapping": { + "rule": "repeated", + "type": "SourceTargetMapping", + "id": 1 + }, + "targetBaseUri": { + "type": "string", + "id": 2 + }, + "sourceEnvironment": { + "type": "SourceEnvironment", + "id": 3 + }, + "targetReturnLiterals": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "targetTypes": { + "rule": "repeated", + "type": "string", + "id": 5 + } + } + }, + "SourceTargetMapping": { + "fields": { + "sourceSpec": { + "type": "SourceSpec", + "id": 1 + }, + "targetSpec": { + "type": "TargetSpec", + "id": 2 + } + } + }, + "SourceSpec": { + "oneofs": { + "source": { + "oneof": [ + "baseUri", + "literal" + ] + } + }, + "fields": { + "baseUri": { + "type": "string", + "id": 1 + }, + "literal": { + "type": "Literal", + "id": 2 + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TargetSpec": { + "fields": { + "relativePath": { + "type": "string", + "id": 1 + } + } + }, + "Literal": { + "oneofs": { + "literalData": { + "oneof": [ + "literalString", + "literalBytes" + ] + } + }, + "fields": { + "literalString": { + "type": "string", + "id": 2 + }, + "literalBytes": { + "type": "bytes", + "id": 3 + }, + "relativePath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SourceEnvironment": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1 + }, + "schemaSearchPath": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "metadataStoreDataset": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GcsReportLogMessage": { + "fields": { + "severity": { + "type": "string", + "id": 1 + }, + "category": { + "type": "string", + "id": 2 + }, + "filePath": { + "type": "string", + "id": 3 + }, + "filename": { + "type": "string", + "id": 4 + }, + "sourceScriptLine": { + "type": "int32", + "id": 5 + }, + "sourceScriptColumn": { + "type": "int32", + "id": 6 + }, + "message": { + "type": "string", + "id": 7 + }, + "scriptContext": { + "type": "string", + "id": 8 + }, + "action": { + "type": "string", + "id": 9 + }, + "effect": { + "type": "string", + "id": 10 + }, + "objectName": { + "type": "string", + "id": 11 } } }, @@ -946,6 +1217,40 @@ "id": 2 } } + }, + "TranslationReportRecord": { + "fields": { + "severity": { + "type": "Severity", + "id": 1 + }, + "scriptLine": { + "type": "int32", + "id": 2 + }, + "scriptColumn": { + "type": "int32", + "id": 3 + }, + "category": { + "type": "string", + "id": 4 + }, + "message": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "INFO": 1, + "WARNING": 2, + "ERROR": 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 57df7ab0313..b8cc943ce51 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 @@ -3,5 +3,8 @@ "../../protos/google/cloud/bigquery/migration/v2/migration_error_details.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_metrics.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_service.proto", - "../../protos/google/cloud/bigquery/migration/v2/translation_config.proto" + "../../protos/google/cloud/bigquery/migration/v2/translation_config.proto", + "../../protos/google/cloud/bigquery/migration/v2/translation_details.proto", + "../../protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto", + "../../protos/google/cloud/bigquery/migration/v2/translation_usability.proto" ]